/* =============================================================
   Redesigned town hub (templates/site/neighborhood_rd.html, page key 'town').
   Mockup: docs/redesign/mockups/town.dc.html. Builds on rd.css (tokens,
   .rd-wrap, .rd-section, .rd-btn, .rd-card, .rd-facts); every class here is
   rdt- prefixed or scoped under .rdt, so it cannot restyle another page.
   ============================================================= */

.rdt { overflow-x: clip; }
.rdt-stack { display: flex; flex-direction: column; gap: 20px; }
.rdt-narrow { max-width: 860px; }
.rdt .rd-h2 { max-width: 22ch; }
.rdt-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.rdt-head .rd-h2 { max-width: none; }

/* ---------- 1. hero ---------- */
.rdt-hero { position: relative; background: var(--brand-primary); color: var(--brand-base); }
.rdt-hero--photo { background: linear-gradient(180deg, rgba(13, 43, 31, .82), rgba(13, 43, 31, .94)), var(--rdt-hero-img) center / cover no-repeat, var(--brand-primary); }
.rdt-hero__inner { display: flex; flex-direction: column; gap: 14px; padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(40px, 5vw, 64px); }
.rdt-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--rd-on-dark-muted); }
.rdt-crumbs a { color: var(--rd-on-dark); }
.rdt-crumbs a:hover { color: var(--brand-base); }
.rdt-hero__where { font-size: 13px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--brand-warm); }
.rdt .rdt-hero__h1 { color: var(--brand-base); font-size: clamp(34px, 4.6vw, 58px); line-height: 1.06; max-width: 20ch; }
.rdt-hero__lead { font-size: 18px; line-height: 1.6; color: var(--rd-on-dark); max-width: 820px; }
.rdt-hero__lead a { color: var(--brand-warm); }
.rdt-hero__facts { margin-top: 14px; }
.rdt-hero__facts .rd-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px 28px; }
.rdt-hero__none { color: var(--rd-on-dark); max-width: 820px; }
.rdt-hero__none a { color: var(--brand-warm); font-weight: 600; }
.rdt-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.rdt .rdt-btn--ghost { color: var(--brand-base); border-color: rgba(255, 255, 255, .5); background: transparent; white-space: normal; text-align: center; }
.rdt .rdt-btn--ghost:hover { color: var(--brand-base); border-color: var(--brand-base); background: rgba(255, 255, 255, .06); }

/* ---------- 2. homes ---------- */
.rdt-note { font-size: 15px; line-height: 1.6; }
.rdt-note a { font-weight: 700; }
.rdt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rdt-chip { min-height: var(--rd-tap); padding: 0 16px; border-radius: 999px; border: 1px solid var(--rd-line-strong); color: var(--brand-primary); background: var(--brand-base); text-decoration: none; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.rd .rdt-chip { color: var(--brand-primary); }
.rdt-chip span { font-weight: 400; color: var(--rd-muted); }
.rdt-chip:hover { border-color: var(--brand-primary); }
.rd .rdt-chip.is-on { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-base); }
.rdt-chip.is-on span { color: var(--rd-on-dark); }
.rdt-cards > li { min-width: 0; }
.rd .rdt-maptile { height: 100%; min-height: 200px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; border-radius: var(--rd-radius-card); background: var(--brand-primary); color: var(--brand-base); text-decoration: none; padding: 24px 22px; }
.rd .rdt-maptile:hover { background: var(--brand-accent); color: var(--brand-base); }
.rdt-maptile__big { font-family: var(--rd-serif); font-size: 26px; line-height: 1.2; }
.rdt-maptile__text { font-size: 15px; line-height: 1.5; color: var(--rd-on-dark); }
.rdt-maptile__go { font-weight: 700; color: var(--brand-warm); }

/* ---------- 3. guide: one block open, the whole text in <details> ---------- */
.rdt-summary { display: flex; flex-direction: column; gap: 14px; }
.rdt-summary__body { font-size: 16px; line-height: 1.6; max-width: 1100px; }
.rdt-summary__body > p { max-width: 760px; margin: 0 0 8px; }
/* The block's list as numbered facts under gold rules (mockup "1 2 3"). */
.rdt-summary__body ul, .rdt-summary__body ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px 36px; counter-reset: rdt-n; }
.rdt-summary__body li { counter-increment: rdt-n; border-top: 1px solid var(--brand-warm); padding-top: 16px; font-size: 15px; line-height: 1.6; }
.rdt-summary__body li::before { content: counter(rdt-n); display: block; font-family: var(--rd-serif); font-size: 30px; line-height: 1; color: var(--brand-accent); margin-bottom: 10px; }
.rdt-summary__body li strong:first-child { display: block; font-size: 17px; line-height: 1.35; color: var(--brand-primary); margin-bottom: 4px; }
.rdt-lead { font-size: 17px; font-weight: 600; color: var(--brand-primary); }
.rdt-qa { background: var(--brand-base); border-left: 3px solid var(--brand-warm); border-radius: 0 var(--rd-radius-btn) var(--rd-radius-btn) 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.6; max-width: 860px; }

.rdt-more { background: var(--brand-base); border-radius: 12px; padding: 4px 20px; }
.rdt-more > summary, .rdt-faq > summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; font-weight: 600; color: var(--brand-primary); list-style: none; }
.rdt-more > summary::-webkit-details-marker, .rdt-faq > summary::-webkit-details-marker { display: none; }
.rdt-more__sign::before { content: '+'; font-size: 22px; line-height: 1; color: var(--brand-accent); }
details[open] > summary .rdt-more__sign::before { content: '\2212'; }
.rdt-guide__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; align-items: start; padding: 8px 0 24px; }
.rdt-why { border-top: 1px solid var(--brand-warm); padding-top: 14px; }
.rdt-why ul { list-style: none; margin: 12px 0 0; padding: 0; }
.rdt-why li { padding: 10px 0; border-bottom: 1px solid var(--rd-line); font-size: 15px; line-height: 1.5; }
.rdt-why li:last-child { border-bottom: 0; }

/* The CMS About text (and custom sections): today's look for its tables,
   accordions and card grids, from site/neighborhood.html. */
.rdt-prose { font-size: 16px; line-height: 1.75; min-width: 0; }
.rdt-prose h2 { margin: 0 0 16px; }
.rdt-prose h3 { font-family: var(--rd-serif); font-weight: 400; font-size: 23px; line-height: 1.25; margin: 28px 0 10px; color: var(--brand-primary); }
.rdt-prose h4 { font-size: 17px; font-weight: 700; margin: 20px 0 6px; color: var(--brand-primary); }
.rdt-prose p { margin: 0 0 14px; }
.rdt-prose ul, .rdt-prose ol { margin: 0 0 16px; padding-left: 22px; }
.rdt-prose li { margin-bottom: 6px; }
.nbh-desc-text { container-type: inline-size; }
@container (min-width: 700px) {
  .nbh-desc-text div[style*="auto-fill"]:has(> :last-child:nth-child(3n+4)),
  .nbh-desc-text div[style*="auto-fit"]:has(> :last-child:nth-child(3n+4)) { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .nbh-desc-text div[style*="auto-fill"] > :last-child:nth-child(12n+13),
  .nbh-desc-text div[style*="auto-fit"] > :last-child:nth-child(12n+13) { grid-column: 1 / -1; }
}
@container (min-width: 440px) and (max-width: 699px) {
  .nbh-desc-text div[style*="auto-fill"] > :last-child:nth-child(odd),
  .nbh-desc-text div[style*="auto-fit"] > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.nbh-desc-text .spoke-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--rd-line); margin: 16px 0 24px; }
.nbh-desc-text .spoke-table thead th { background: var(--brand-primary); color: var(--brand-base); padding: 12px 16px; text-align: left; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.nbh-desc-text .spoke-table tbody tr { background: var(--brand-base); }
.nbh-desc-text .spoke-table tbody tr:nth-child(even) { background: var(--brand-tint); }
.nbh-desc-text .spoke-table td { padding: 12px 16px; border-bottom: 1px solid var(--rd-line); font-size: 15px; }
.nbh-desc-text .spoke-table td:first-child { font-weight: 600; color: var(--brand-primary); }
.nbh-desc-text details summary { cursor: pointer; }
.nbh-desc-text details summary::after { content: '+'; font-size: 1.3rem; color: var(--brand-accent); flex-shrink: 0; }
.nbh-desc-text details[open] summary::after { content: '\2212'; }

/* ---------- 4. taxes + rental rules ---------- */
.rdt-rulefacts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 32px; }
.rdt-rulefact { border-top: 1px solid var(--brand-warm); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rdt-rulefact__label { font-size: 13px; font-weight: 600; color: var(--rd-muted); }
.rdt-rulefact__val { font-family: var(--rd-serif); font-size: 21px; line-height: 1.3; color: var(--brand-primary); }
.rdt-rulefact__text { font-size: 14px; line-height: 1.55; }
.rdt-links { display: flex; flex-wrap: wrap; gap: 6px 28px; }

/* ---------- 5. home value form (public/_instant_value_form.html restyled) ---------- */
.rdt-value__grid { display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: center; }
.rdt-value__copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.rdt-value__copy p { font-size: 16px; line-height: 1.6; color: var(--rd-on-dark); max-width: 560px; }
.rdt-value .rdt-value__copy .rd-eyebrow { color: var(--brand-warm); }
.rdt-value__stat { font-size: 15px !important; }
.rdt-value__card { flex: 1 1 380px; min-width: 0; background: var(--brand-base); color: var(--brand-body); border-radius: var(--rd-radius-panel); padding: clamp(20px, 3vw, 30px); }
.rdt-value .iv-form, .rdt-value .iv-result { max-width: none; margin: 0; }
.rdt-value .iv-fields { gap: 14px; }
.rdt-value .iv-field { font-size: 14px; color: var(--brand-primary); }
.rdt-value .iv-field input { height: var(--rd-input-h); padding: 0 14px; border: 1px solid var(--rd-input-line); border-radius: var(--rd-radius-btn); font-size: 16px; }
.rdt-value .iv-field input:focus { outline: 3px solid rgba(212, 168, 67, .55); outline-offset: 0; border-color: var(--brand-primary); }
.rdt-value .iv-submit { min-height: 52px; background: var(--brand-warm); color: var(--brand-primary); border-radius: var(--rd-radius-btn); box-shadow: none; font-size: 16px; }
.rdt-value .iv-submit:hover { background: #C69833; }
.rdt-value .iv-consent { font-size: 13px; line-height: 1.5; color: var(--rd-muted); }
.rdt-value .iv-consent input { width: 20px; height: 20px; }
.rdt-value .iv-fine { color: var(--rd-muted); }
.rdt-value .iv-result { color: var(--brand-body); }
.rdt-mrb { padding: 8px var(--rd-gutter); }

/* ---------- 6. FAQs ---------- */
.rdt-faq { border-top: 1px solid var(--rd-line); }
.rdt-faq:last-child { border-bottom: 1px solid var(--rd-line); }
.rdt-faq > summary { min-height: 58px; padding: 8px 0; }
.rdt-faq .faq-answer { margin: 0 0 16px; font-size: 15px; line-height: 1.7; }

/* ---------- 7. link lists ---------- */
.rdt-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 36px 48px; align-items: start; }
.rdt-list { min-width: 0; }
.rd .rdt-list__head, .rdt-legacy .seller-questions h2 { font-family: var(--rd-sans); font-size: 13px !important; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-accent) !important; margin: 0 0 6px !important; }
.rdt-list__sub { font-size: 14px; color: var(--rd-muted); margin-bottom: 8px !important; }
.rdt-list ul { list-style: none; margin: 0; padding: 0; }
.rdt-list li { border-top: 1px solid var(--rd-line); }
.rdt-list li:last-child { border-bottom: 1px solid var(--rd-line); }
.rdt-list li > a { min-height: var(--rd-tap); display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 24px 10px 0; position: relative; color: var(--brand-primary); text-decoration: none; }
.rdt-list li > a::after { content: '\2192'; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); color: var(--brand-accent); }
.rdt-list li > a:hover .rdt-list__title { text-decoration: underline; text-decoration-color: var(--brand-warm); }
.rdt-list__title { font-weight: 600; }
.rdt-list__desc { font-size: 14px; line-height: 1.5; color: var(--rd-muted); }
.rdt-list__kicker { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--brand-accent); }
/* site/_seller_questions.html (inline styles) as one of the lists. */
.rdt-legacy .seller-questions { background: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
.rdt-legacy .seller-questions ul { list-style: none; margin: 0 !important; padding: 0 !important; line-height: 1.5 !important; }
.rdt-legacy .seller-questions li { border-top: 1px solid var(--rd-line); }
.rdt-legacy .seller-questions li:last-child { border-bottom: 1px solid var(--rd-line); }
.rdt-list.rdt-legacy .seller-questions li > a { min-height: var(--rd-tap); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; padding: 10px 24px 10px 0; font-weight: 600; color: var(--brand-primary) !important; text-decoration: none; }

/* ---------- legacy partials kept as they are (by the numbers, MG rentals) ---------- */
.rdt-legacy .container { max-width: var(--rd-max); margin: 0 auto; padding: 0 var(--rd-gutter); }
.rdt-legacy .section-padding { padding: clamp(40px, 5vw, 64px) 0; }
.rdt-legacy .section-title { font-family: var(--rd-serif); font-weight: 400; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; color: var(--brand-primary); margin: 0 0 16px; text-align: left; }
.rdt-numbers section { background: var(--brand-base) !important; }
.rdt-numbers p { text-align: left !important; margin-left: 0 !important; margin-right: 0 !important; }
.rdt-numbers .ob-tiles { margin-left: 0 !important; }
.rdt-numbers .ob-tiles > div { background: none !important; border: 0 !important; border-top: 1px solid var(--brand-warm) !important; border-radius: 0 !important; text-align: left !important; padding: 14px 0 0 !important; }
.rdt-numbers .ob-tiles > div > div:first-child { font-family: var(--rd-serif); font-weight: 400 !important; }
.rdt-numbers .section-title { text-align: left; }
.rdt-mg p { line-height: 1.7; }

/* ---------- 8. contact band ---------- */
.rdt-contact__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.rdt-contact__who { display: flex; gap: 18px; align-items: flex-start; flex: 1 1 420px; min-width: 0; }
/* `.rd` in front: the 11/21 fix for the oval photo, kept (see .rd-contact__photo and the base image rule in rd.css). */
.rd .rdt-contact__photo { width: 76px; height: 76px; object-fit: cover; object-position: top; border-radius: 50%; flex: 0 0 auto; }
.rdt-contact__copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rdt-contact__copy p { font-size: 15px; line-height: 1.6; max-width: 640px; }
.rdt-contact__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- custom sections (CMS) ---------- */
.rdt-custom .rdt-h2 { margin-bottom: 16px; }

/* ---------- phone ---------- */
@media (max-width: 899px) {
  .rdt-guide__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 560px) {
  /* First screen on a phone = the reason and the way to act (brief): the facts
     and both buttons come right after the H1; the quick answer (Incline's is
     ~90 words) follows them. Order only; every word stays in the HTML. */
  .rdt-hero__inner { gap: 12px; }
  .rdt-hero__facts { order: 3; margin-top: 4px; }
  .rdt-hero__ctas { order: 4; margin-top: 4px; }
  .rdt-hero__lead, .rdt-hero__none { order: 5; }
  .rdt-hero__lead { font-size: 16px; }
  .rdt-crumbs { font-size: 12px; }
  .rdt-hero__facts .rd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
  .rdt-hero__facts .rd-fact { padding-top: 10px; gap: 2px; }
  .rdt-hero__facts .rd-fact__num { font-size: 24px; }
  .rdt-hero__facts .rd-fact__cap { font-size: 13px; line-height: 1.35; }
  .rdt .rdt-hero__h1 { font-size: 32px; }
  .rdt-hero__facts .rd-facts > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .rdt-hero__ctas .rd-btn { width: 100%; }
  /* Card grids swipe sideways on a phone: all 24 cards stay in the HTML
     (crawlers and the ItemList read them), the page loses ~8,000 px of stack. */
  .rdt .rdt-cards { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; gap: 12px;
                    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
                    margin: 0 calc(-1 * var(--rd-gutter)); padding: 2px var(--rd-gutter) 12px; scroll-padding: 0 var(--rd-gutter); }
  .rdt .rdt-cards > li { scroll-snap-align: start; }
  .rdt-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--rd-gutter)); padding: 2px var(--rd-gutter) 6px; }
  .rdt-chip { flex: 0 0 auto; white-space: nowrap; }
  .rdt-contact__ctas .rd-btn { width: 100%; }
  .rdt-more { padding: 4px 16px; }
  .nbh-desc-text .spoke-table thead th { padding: 10px 8px; font-size: 12px; letter-spacing: 0; }
  .nbh-desc-text .spoke-table td { padding: 10px 8px; font-size: 14px; }
}
.rdt-contact__name { font-weight: 600; color: var(--brand-primary); }
