/* Community guides (/communities, /communities/<slug>).
   Generated by scripts/communities.mjs. Tokens come from css/system.css.

   Art direction: a printed local guide, not a listings portal. One full-bleed
   photograph sets the place, then the page settles into an editorial rhythm:
   a large-type short answer beside a quiet fact rail, a numbered neighborhood
   index, narrow-measure prose, a light listings strip, an FAQ, and a dark
   close. Sections alternate cream, white and black so the long page never
   reads as one repeated block. */

.cm { --cm-measure: 68ch; background: var(--cream); color: var(--black); }
.cm-wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x); }
.cm-label {
  font-size: 10px; font-weight: var(--w-semi); letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--champ-dark); margin-bottom: 18px;
}
.cm-head { margin-bottom: clamp(32px, 4vw, 56px); }
.cm-head .eyebrow { margin-bottom: 14px; }
.cm-head h2, .cm-prose h2 {
  font-size: var(--t-h2); font-weight: var(--w-light); letter-spacing: var(--tr-heading);
  line-height: 1.2; color: var(--black); text-wrap: balance;
}
.cm-intro {
  font-family: var(--font-serif); font-size: var(--t-lead); line-height: 1.6;
  color: var(--text-sec); max-width: 60ch; margin-top: 16px;
}
.cm a { color: inherit; }

/* ── HERO ─────────────────────────────────────────────────────── */
.cm-hero {
  position: relative; margin-top: 72px; overflow: hidden;
  min-height: clamp(420px, 68vh, 720px);
  display: flex; align-items: flex-end; background: var(--black);
}
.cm-hero-media {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transform: scale(1.06); animation: cm-settle 1.6s var(--ease) forwards;
}
@keyframes cm-settle { to { transform: scale(1); } }
.cm-hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,13,13,0.15) 0%, rgba(13,13,13,0.25) 45%, rgba(13,13,13,0.82) 100%);
}
.cm-hero-inner {
  position: relative; z-index: 1; width: 100%; max-width: var(--max-w);
  margin: 0 auto; padding: 0 var(--pad-x) clamp(40px, 7vw, 88px); color: #FAF7F2;
}
.cm-crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: var(--t-label); margin-bottom: clamp(28px, 5vw, 56px); color: rgba(250,247,242,0.7); }
.cm-crumbs a { color: rgba(250,247,242,0.85); text-decoration: none; border-bottom: 1px solid rgba(200,185,154,0.5); }
.cm-crumbs a:hover { color: #FAF7F2; border-color: var(--champagne); }
.cm-crumbs--dark { color: var(--smoke); }
.cm-crumbs--dark a { color: var(--text-sec); border-color: var(--champagne); }
.cm-crumbs--dark a:hover { color: var(--black); }
.cm-hero-county {
  font-size: 10px; font-weight: var(--w-semi); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--champagne); margin-bottom: 18px;
}
.cm-hero-title {
  font-size: clamp(2.75rem, 8vw, 7rem); font-weight: 200; letter-spacing: var(--tr-display);
  line-height: 0.95; color: #FAF7F2;
}
.cm-hero-title span { display: block; font-weight: var(--w-reg); }
/* Topic guides carry longer titles than a town name; size them down so a
   word like "HOA" never strands on its own line. */
.cm-hero-title--long { font-size: clamp(2.25rem, 5.4vw, 5rem); line-height: 1; max-width: 20ch; text-wrap: balance; }
.cm-hero-title--long span { display: inline; }
.cm-hero-desc { margin-top: 24px; font-size: var(--t-small); letter-spacing: 0.08em; color: rgba(250,247,242,0.75); }

/* ── SHORT ANSWER + FACTS ─────────────────────────────────────── */
.cm-answer { padding: var(--sp-sm) 0; }
.cm-answer-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(40px, 7vw, 112px); align-items: start;
}
.cm-answer-text {
  font-size: clamp(1.25rem, 2.1vw, 1.75rem); font-weight: var(--w-light);
  line-height: 1.5; letter-spacing: -0.01em; color: var(--black); max-width: 40ch;
}
.cm-updated { margin-top: 28px; font-size: var(--t-label); color: var(--smoke); }
.cm-facts { border-top: 1px solid var(--border); margin: 0; }
.cm-fact { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cm-fact dt { font-size: 10px; font-weight: var(--w-semi); letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); padding-top: 3px; }
.cm-fact dd { margin: 0; font-size: var(--t-body); line-height: 1.5; color: var(--black); }

/* ── NEIGHBORHOODS ────────────────────────────────────────────── */
.cm-hoods { background: var(--white); padding: var(--sp-sm) 0; }
.cm-hood-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.cm-hood {
  display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 20px;
  padding: clamp(24px, 3vw, 36px) 0; border-bottom: 1px solid var(--border);
}
.cm-hood-idx { font-size: var(--t-small); color: var(--champ-dark); font-variant-numeric: tabular-nums; padding-top: 6px; }
/* Two rows: the title row sizes to the title, the second absorbs the rest, so
   the "kind" label stays tucked under a one-line title. */
.cm-hood-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; align-items: start; column-gap: clamp(24px, 5vw, 72px); }
.cm-hood h3 { font-size: var(--t-h3); font-weight: var(--w-reg); letter-spacing: var(--tr-heading); line-height: 1.3; text-wrap: balance; }
.cm-hood-kind { grid-column: 1; margin-top: 8px; font-size: 10px; font-weight: var(--w-semi); letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); }
.cm-hood-text { grid-column: 2; grid-row: 1 / span 2; font-family: var(--font-serif); font-size: var(--t-body); line-height: 1.75; color: var(--text-sec); }

/* ── GUIDE PROSE ──────────────────────────────────────────────── */
.cm-guide { padding: var(--sp-sm) 0; }
.cm-prose { max-width: calc(var(--cm-measure) + 2 * var(--pad-x)); }
.cm-section + .cm-section { margin-top: clamp(40px, 5vw, 64px); }
.cm-prose h2 { margin-bottom: 18px; }
.cm-prose p { font-family: var(--font-serif); font-size: 1.0625rem; line-height: 1.8; color: #2b2b2b; }
.cm-prose p + p { margin-top: 1em; }
.cm-prose ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.cm-prose li { position: relative; padding: 12px 0 12px 22px; border-bottom: 1px solid var(--border); font-family: var(--font-serif); font-size: 1rem; line-height: 1.7; color: #2b2b2b; }
.cm-prose li::before { content: ''; position: absolute; left: 2px; top: 1.45em; width: 8px; height: 1px; background: var(--champ-dark); }
.cm-prose a { text-decoration: underline; text-decoration-color: var(--champagne); text-underline-offset: 3px; }
.cm-prose a:hover { text-decoration-color: var(--black); }

/* ── LISTINGS ─────────────────────────────────────────────────── */
.cm-listings { background: var(--white); padding: var(--sp-sm) 0; }
.cm-listings-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.cm-listings-head .eyebrow { margin-bottom: 14px; }
.cm-listings-head h2 { font-size: var(--t-h2); font-weight: var(--w-light); letter-spacing: var(--tr-heading); line-height: 1.2; }
.cm-link {
  display: inline-flex; gap: 10px; align-items: center; font-size: var(--t-small); font-weight: var(--w-med);
  text-decoration: none; padding-bottom: 6px; border-bottom: 1px solid var(--champagne);
  transition: gap 0.4s var(--ease), border-color 0.25s ease;
}
.cm-link:hover { gap: 16px; border-color: var(--black); }
.cm-listing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 36px); }
.cm-home { display: block; text-decoration: none; color: inherit; }
.cm-home-img { aspect-ratio: 4 / 3; border-radius: var(--r-img); overflow: hidden; background: var(--mist); }
.cm-home-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s var(--ease); }
.cm-home:hover .cm-home-img img { transform: scale(1.05); }
.cm-home-price { margin-top: 18px; font-size: var(--t-h3); font-weight: var(--w-light); font-variant-numeric: lining-nums tabular-nums; }
.cm-home-addr { margin-top: 6px; font-size: var(--t-body); }
.cm-home-specs { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--mist); font-size: var(--t-label); color: var(--pewter); }
.cm-listing-empty { grid-column: 1 / -1; font-family: var(--font-serif); color: var(--text-sec); }
.cm-skel { aspect-ratio: 4 / 3; border-radius: var(--r-img); background: linear-gradient(90deg, var(--mist) 0%, var(--cream-dark) 50%, var(--mist) 100%); background-size: 200% 100%; animation: cm-shimmer 1.4s linear infinite; }
@keyframes cm-shimmer { to { background-position: -200% 0; } }

/* ── FAQ ──────────────────────────────────────────────────────── */
.cm-faq { padding: var(--sp-sm) 0; }
.cm-faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.cm-faq-list { border-top: 1px solid var(--border); }
.cm-q { border-bottom: 1px solid var(--border); }
.cm-q summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; cursor: pointer; list-style: none; }
.cm-q summary::-webkit-details-marker { display: none; }
.cm-q summary h3 { font-size: var(--t-lead); font-weight: var(--w-reg); line-height: 1.4; letter-spacing: -0.01em; }
.cm-q-icon { position: relative; flex: 0 0 14px; height: 14px; }
.cm-q-icon::before, .cm-q-icon::after { content: ''; position: absolute; left: 0; top: 50%; width: 14px; height: 1px; background: var(--champ-dark); transition: transform 0.4s var(--ease); }
.cm-q-icon::after { transform: rotate(90deg); }
.cm-q[open] .cm-q-icon::after { transform: rotate(0deg); }
.cm-q p { padding: 0 0 26px; font-family: var(--font-serif); font-size: var(--t-body); line-height: 1.8; color: var(--text-sec); max-width: 64ch; }
.cm-q summary:focus-visible { outline: 2px solid var(--champagne); outline-offset: 4px; }

/* ── FURTHER READING ──────────────────────────────────────────── */
.cm-reading { background: var(--white); padding: var(--sp-sm) 0; }
.cm-read-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 64px); border-top: 1px solid var(--border); }
.cm-read-list a { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.cm-read-title { font-size: var(--t-body); font-weight: var(--w-med); line-height: 1.4; transition: color 0.25s ease; }
.cm-read-meta { grid-row: 2; margin-top: 6px; font-size: var(--t-label); color: var(--smoke); }
.cm-read-arrow { grid-row: 1 / span 2; align-self: center; color: var(--champ-dark); transition: transform 0.45s var(--ease); }
@media (hover: hover) {
  .cm-read-list a:hover .cm-read-title { color: var(--champ-dark); }
  .cm-read-list a:hover .cm-read-arrow { transform: translateX(6px); }
}

/* ── CTA (dark close) ─────────────────────────────────────────── */
.cm-cta { background: var(--black); color: #FAF7F2; padding: var(--sp-md) 0; }
.cm-cta-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 7vw, 112px); align-items: end; }
.cm-cta-eyebrow { color: var(--champagne); margin-bottom: 18px; }
.cm-cta h2 { font-size: var(--t-h1); font-weight: var(--w-light); letter-spacing: -0.025em; line-height: 1.1; max-width: 18ch; text-wrap: balance; }
.cm-cta-sub { margin-top: 22px; font-size: var(--t-lead); line-height: 1.55; color: rgba(250,247,242,0.62); max-width: 52ch; }
.cm-cta-actions { margin-top: 36px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.cm-cta-phone { color: #FAF7F2 !important; text-decoration: none; font-size: var(--t-body); border-bottom: 1px solid rgba(200,185,154,0.5); padding-bottom: 4px; }
.cm-cta-phone:hover { border-color: var(--champagne); }
.cm-others { border-top: 1px solid rgba(250,247,242,0.12); }
.cm-others .cm-label { color: var(--champagne); margin: 18px 0 6px; }
.cm-others a { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(250,247,242,0.12); text-decoration: none; font-size: var(--t-h3); font-weight: var(--w-light); transition: padding 0.4s var(--ease), color 0.25s ease; }
.cm-others a:hover { padding-left: 8px; color: var(--champagne); }
.cm-others-county { font-size: var(--t-label); color: rgba(250,247,242,0.45); align-self: center; }

/* ── HUB ──────────────────────────────────────────────────────── */
.cm-hub-head { padding: calc(72px + var(--sp-xs)) 0 var(--sp-xs); }
.cm-hub-title {
  font-size: clamp(2.5rem, 6.4vw, 5.75rem); font-weight: 200; letter-spacing: var(--tr-display);
  line-height: 1; max-width: 16ch; text-wrap: balance;
}
.cm-hub-title span { color: var(--champ-dark); }
.cm-hub-answer { margin-top: clamp(28px, 4vw, 48px); max-width: 52ch; }
.cm-hub-cards { padding: 0 0 var(--sp-sm); }
.cm-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 36px); }
.cm-card { position: relative; display: block; overflow: hidden; border-radius: var(--r-card); aspect-ratio: 4 / 3; text-decoration: none; background: var(--black); }
.cm-card-media { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 1.2s var(--ease); }
.cm-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,13,13,0) 35%, rgba(13,13,13,0.85) 100%); }
.cm-card-body { position: absolute; inset: auto 0 0 0; z-index: 1; padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 6px; color: #FAF7F2; }
.cm-card-idx { font-size: var(--t-small); color: rgba(250,247,242,0.6); font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.cm-card-county { font-size: 10px; font-weight: var(--w-semi); letter-spacing: 0.18em; text-transform: uppercase; color: var(--champagne); }
.cm-card-name { font-size: clamp(1.75rem, 3.4vw, 2.75rem); font-weight: var(--w-light); letter-spacing: var(--tr-heading); line-height: 1.05; }
.cm-card-desc { font-size: var(--t-label); color: rgba(250,247,242,0.72); }
.cm-card-go { margin-top: 12px; font-size: var(--t-small); font-weight: var(--w-med); opacity: 0.85; transition: opacity 0.3s ease; }
@media (hover: hover) {
  .cm-card:hover .cm-card-media { transform: scale(1.05); }
  .cm-card:hover .cm-card-go { opacity: 1; }
}
.cm-card:focus-visible { outline: 2px solid var(--champagne); outline-offset: 4px; }
.cm-compare { background: var(--white); padding: var(--sp-sm) 0; }
.cm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cm-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: var(--t-body); }
.cm-table th, .cm-table td { text-align: left; padding: 18px 20px 18px 0; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.cm-table thead th { font-size: 10px; font-weight: var(--w-semi); letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); }
.cm-table tbody th { font-weight: var(--w-med); white-space: nowrap; }
.cm-table tbody th a { text-decoration: underline; text-decoration-color: var(--champagne); text-underline-offset: 3px; }
.cm-table td { color: var(--text-sec); }

/* Five community cards: the odd one out runs full width as a banner rather
   than leaving a hole in the 2-up grid. */
.cm-card:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 21 / 8; }
.cm-hub-list { background: var(--cream); }

/* ── PROS AND CONS ────────────────────────────────────────────── */
.cm-pc { background: var(--white); padding: var(--sp-sm) 0; }
.cm-pc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); }
.cm-pc-col h3 {
  font-size: 10px; font-weight: var(--w-semi); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--badge-green); padding-bottom: 14px; border-bottom: 1px solid var(--black);
}
.cm-pc-col--cons h3 { color: var(--champ-dark); }
.cm-pc-col ul { list-style: none; margin: 0; padding: 0; }
.cm-pc-col li {
  position: relative; padding: 16px 0 16px 26px; border-bottom: 1px solid var(--border);
  font-family: var(--font-serif); font-size: var(--t-body); line-height: 1.7; color: #2b2b2b;
}
.cm-pc-col li::before { content: '+'; position: absolute; left: 2px; top: 15px; font-family: var(--font); color: var(--badge-green); }
.cm-pc-col--cons li::before { content: '−'; color: var(--champ-dark); }

/* ── COMPARE PAGES ────────────────────────────────────────────── */
.cm-vs-head { padding: calc(72px + var(--sp-xs)) 0 var(--sp-xs); }
.cm-vs-eyebrow { color: var(--champ-dark); }
.cm-vs-title {
  font-size: clamp(2.5rem, 7vw, 6.25rem); font-weight: 200; letter-spacing: var(--tr-display);
  line-height: 1; max-width: 14ch; text-wrap: balance;
}
.cm-vs-x { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--champ-dark); font-size: 0.6em; }
.cm-vs-sides { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 32px); }
.cm-vs-side { display: flex; flex-direction: column; gap: 6px; }
.cm-vs-img { aspect-ratio: 16 / 9; border-radius: var(--r-img); background: var(--mist) center / cover; margin-bottom: 10px; }
.cm-vs-name { font-size: var(--t-h3); font-weight: var(--w-reg); }
.cm-vs-county { font-size: 10px; font-weight: var(--w-semi); letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); }
.cm-table--vs { min-width: 560px; }
.cm-table--vs th[scope="row"] { width: 22%; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); font-weight: var(--w-semi); white-space: normal; }
.cm-table--vs td { width: 39%; color: var(--black); }
.cm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cm-choose { padding: var(--sp-sm) 0; }
.cm-choose-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); }
.cm-choose-col h3 { font-size: var(--t-h3); font-weight: var(--w-reg); letter-spacing: var(--tr-heading); padding-bottom: 14px; border-bottom: 1px solid var(--black); }
.cm-choose-col ul { list-style: none; margin: 0 0 28px; padding: 0; }
.cm-choose-col li { padding: 14px 0; border-bottom: 1px solid var(--border); font-family: var(--font-serif); font-size: var(--t-body); line-height: 1.7; color: #2b2b2b; }

/* ── SOURCES ──────────────────────────────────────────────────── */
.cm-sources { padding: 0 0 var(--sp-xs); }
.cm-sources ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.cm-sources a { font-size: var(--t-label); color: var(--text-sec); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.cm-sources a:hover { color: var(--black); text-decoration-color: var(--champagne); }
.cm-q p a, .cm-hood h3 a { text-decoration: underline; text-decoration-color: var(--champagne); text-underline-offset: 3px; }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 960px) {
  .cm-answer-grid, .cm-faq-grid, .cm-cta-grid { grid-template-columns: 1fr; }
  .cm-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-hood-body { grid-template-columns: 1fr; }
  .cm-hood-text { grid-column: 1; grid-row: auto; margin-top: 14px; }
}
@media (max-width: 640px) {
  .cm-hero { min-height: 460px; }
  .cm-hood { grid-template-columns: 2.25rem minmax(0, 1fr); gap: 12px; }
  .cm-fact { grid-template-columns: 1fr; gap: 4px; }
  .cm-listing-grid, .cm-card-grid, .cm-read-list, .cm-pc-grid, .cm-choose-grid { grid-template-columns: 1fr; }
  .cm-card, .cm-card:last-child:nth-child(odd) { aspect-ratio: 5 / 4; }
  .cm-vs-sides { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-hero-media { animation: none; transform: none; }
  .cm-skel { animation: none; }
}
