/* Approved Terra shared design system. Existing typography/content and functional widgets are retained. */
body.terra-design {
 --terra-radius-control: 4px;
 --terra-radius-surface: 6px;
 --terra-divider: 1px solid var(--line);
 --terra-depth: 0 3px 12px color-mix(in srgb, var(--ink) 6%, transparent);
}
body.terra-design main .button:not(.button-light) { background: var(--garden); border-color: var(--garden); color: #fff; border-radius: var(--terra-radius-control); }
body.terra-design main .button:not(.button-light):hover { background: var(--moss); border-color: var(--moss); }
body.terra-design main a:focus-visible,
body.terra-design main summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
body.terra-design :is(.home-v2-text-link,.core-v2-text-link,.homes-text-link) { text-decoration-color: var(--clay); text-decoration-thickness: 2px; text-underline-offset: .3em; }
/* Home: an open welcome narrative, followed by distinct information bands. */
body.terra-design .home-v2-welcome { background: var(--cream); border-block: var(--terra-divider); }
body.terra-design .home-v2-welcome-copy { border-inline-start: 0; padding-inline-start: 0; }
body.terra-design .home-v2-homes { background: var(--sage); border-block-end: var(--terra-divider); }
body.terra-design .home-v2-updates { background: var(--cream); border-block-start: var(--terra-divider); }
body.terra-design .home-v2-image-cluster img { border-radius: var(--terra-radius-surface); }
/* Community: keep the story flowing; frame only the existing image and text relationships. */
body.terra-design .core-community .core-v2-principles { background: var(--sage); border-block: var(--terra-divider); }
body.terra-design .core-community .core-v2-story { border-block-end: var(--terra-divider); }
body.terra-design .core-community .core-v2-story > div { max-width: 42rem; }
body.terra-design .core-community .core-v2-story > figure { border-radius: var(--terra-radius-surface); overflow: hidden; box-shadow: var(--terra-depth); }
body.terra-design .tf-local-area { background: var(--cream); border-block: var(--terra-divider); }
/* Live Here: distinguish the map canvas from the catalogue; preserve the map's scroll/hotspots. */
body.terra-design .homes-site-plan { background: var(--cream); border-block: var(--terra-divider); }
body.terra-design .homes-map-scroll-frame { border: var(--terra-divider); border-radius: var(--terra-radius-surface); box-shadow: var(--terra-depth); }
body.terra-design .homes-phase > header { border-inline-start: 0; padding-inline-start: 0; }
body.terra-design .homes-catalog-card { border-radius: var(--terra-radius-surface); background: var(--cream); box-shadow: none; }
body.terra-design .homes-card-action { border-radius: var(--terra-radius-control); }
body.terra-design .homes-catalog-ledger { background: var(--sage); border-block: var(--terra-divider); }
/* FAQ: one ruled reading surface per section; no individual accordion cards. */
body.terra-design .core-v2-topic-nav { background: var(--sage); border-block: var(--terra-divider); }
body.terra-design .core-v2-topic-nav a { color: var(--moss); }
body.terra-design .core-v2-faq-group > div { background: var(--cream); border-block: var(--terra-divider); padding-inline: clamp(1rem,2vw,1.5rem); border-radius: var(--terra-radius-surface); }
body.terra-design .core-v2-faq-group summary { color: var(--moss); }
body.terra-design .core-v2-faq-group details[open] > summary { box-shadow: inset 0 -2px 0 var(--clay); }
body.terra-design .core-v2-faq-group details > div { max-width: 46rem; }

/* One page coordinate system: centered 82rem frame including its inner gutter.
   Full-bleed bands use the resulting edge; nested content adds no second gutter. */
body.terra-design {
 --terra-frame: 82rem;
 --terra-gutter: clamp(1.25rem, 5.5vw, 5rem);
 --terra-page-edge: max(var(--terra-gutter), calc((100vw - var(--terra-frame)) / 2 + var(--terra-gutter)));
 --terra-grid-gap: clamp(1.75rem, 5vw, 5rem);
 --terra-panel-inset: clamp(1rem, 2vw, 1.5rem);
}
body.terra-design :is(.home-v2,.core-v2) { --v2-section-x: var(--terra-page-edge); }
body.terra-design :is(.home-v2-intro,.home-v2-image-cluster,.home-v2-amenities,.home-v2-updates,.home-v2-supplemental,.core-v2-split-hero,.core-v2-hero-image,.tf-local-area,.homes-catalog-introduction,.homes-site-plan,.homes-huffman-properties) {
 max-width: none; width: auto; margin-inline: 0; padding-inline: var(--terra-page-edge);
}
body.terra-design :is(.homes-site-plan,.homes-huffman-properties) { border-inline: 0; }
body.terra-design .homes-map-heading { padding-inline: 0; }
body.terra-design .homes-catalog-content { max-width: none; padding-inline: 0; }
body.terra-design :is(.homes-phase,.homes-catalog-ledger,.homes-faq-cta) { padding-inline: var(--terra-page-edge); }
body.terra-design .homes-catalog-ledger header { margin-inline: 0; }
body.terra-design .homes-ledger-row { padding-inline: 0; }
body.terra-design :is(.home-v2-welcome,.core-v2-principles,.core-v2-nearby,.core-v2-faq-group,.homes-huffman-properties,.home-v2-amenities > header) {
 align-items: start; gap: var(--terra-grid-gap); grid-template-columns: minmax(12rem,.8fr) minmax(0,1.5fr);
}
body.terra-design .home-v2-amenities > header { row-gap: .75rem; }
body.terra-design :is(.home-v2-homes,.core-v2-story) { align-items: start; gap: var(--terra-grid-gap); }
body.terra-design .core-v2-faq-group > div { padding-inline: var(--terra-panel-inset); }
/* Short section-title rule follows the heading's own font geometry.
   Heroes, card titles, accordion summaries and centered CTAs retain their hierarchy. */
body.terra-design :is(.home-v2-welcome,.home-v2-homes,.home-v2-amenities > header,.home-v2-updates > header,.home-v2-supplemental,.tf-local-area,.core-v2-principles,.core-v2-story,.core-v2-nearby,.core-v2-faq-group,.homes-map-heading,.homes-huffman-properties,.homes-phase-heading,.homes-catalog-ledger) h2::after {
 content: ""; display: block; inline-size: clamp(2rem, 1em, 3rem); block-size: 2px; margin-block-start: .35em; background: var(--clay);
}
@media (max-width: 68rem) {
 body.terra-design :is(.home-v2-welcome,.core-v2-principles,.core-v2-nearby,.core-v2-faq-group,.homes-huffman-properties,.home-v2-amenities > header) { grid-template-columns: minmax(0,1fr); }
 body.terra-design .home-v2-amenities > header > :is(p,a) { grid-column: auto; }
}

/* Local Area is a compact reference band, not a second welcome narrative.
   Its title/address masthead sits above a full-width fact list. */
body.terra-design .tf-local-area {
 background: var(--sage); grid-template-columns: minmax(0,1fr);
 gap: 1.25rem; padding-block: clamp(1.75rem,3vw,2.75rem);
}
body.terra-design .tf-local-area-copy {
 display: grid; grid-template-columns: minmax(0,1fr) minmax(0,26rem);
 align-items: end; gap: .4rem var(--terra-grid-gap);
}
body.terra-design .tf-local-area-kicker { grid-column: 1 / -1; margin: 0; }
body.terra-design .tf-local-area-copy h2 { font-size: clamp(1.85rem,2.6vw,2.6rem); margin: 0; }
body.terra-design .tf-local-area-copy p:last-child { font-size: .9rem; line-height: 1.5; }
body.terra-design .tf-local-area ul {
 grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0 1.5rem;
 border-block: var(--terra-divider);
}
body.terra-design .tf-local-area li {
 border-bottom: 0; padding-block: .85rem; font-size: .9rem;
}
@media (max-width: 68rem) {
 body.terra-design .tf-local-area ul { grid-template-columns: repeat(2,minmax(0,1fr)); }
 body.terra-design .tf-local-area li { border-bottom: var(--terra-divider); }
 body.terra-design .tf-local-area ul { border-bottom: 0; }
}
@media (max-width: 38rem) {
 body.terra-design .tf-local-area-copy { grid-template-columns: minmax(0,1fr); gap: .75rem; }
 body.terra-design .tf-local-area ul { grid-template-columns: minmax(0,1fr); }
}

/* Green Built: a warm craft/material pairing, distinct from the sage reference band. */
body.terra-design .home-v2-homes { background: var(--linen); border-block: var(--terra-divider); }
body.terra-design .home-v2-homes-copy { border-top: 2px solid var(--clay); padding-block-start: 1rem; }
body.terra-design .home-v2-homes figure { border: var(--terra-divider); background: var(--cream); padding: .5rem; border-radius: var(--terra-radius-control); }
/* Original static SVG background accents. Decorative CSS only: no accessible
   content, network dependency, extra layout space, animation or pointer target. */
body.terra-design :is(.home-v2-welcome,.tf-local-area,.home-v2-homes,.core-v2-principles,.core-v2-story,.homes-phase,.core-v2-faq-group) { position: relative; }
body.terra-design :is(.home-v2-welcome,.tf-local-area,.home-v2-homes,.core-v2-principles,.core-v2-story,.homes-phase,.core-v2-faq-group)::before {
 content: ""; position: absolute; pointer-events: none; right: var(--terra-page-edge); top: .25rem;
 width: 6rem; height: 1.25rem; background: var(--terra-accent-image) center / contain no-repeat;
}

body.terra-design { --terra-motif-sprig: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20128%2032%22%20fill%3D%22none%22%20stroke%3D%22%235f7a4b%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M28%2025Q65%2023%2094%205M52%2020Q44%205%2034%208Q37%2020%2052%2020M68%2015Q65%201%2055%203Q57%2014%2068%2015M77%2012Q93%2020%20102%2014Q91%207%2077%2012%22%2F%3E%3C%2Fsvg%3E"); }

body.terra-design { --terra-motif-rows: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20128%2032%22%20fill%3D%22none%22%20stroke%3D%22%235f7a4b%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%2025Q55%208%20110%208M32%2028Q66%2015%20112%2015M51%2029Q79%2022%20114%2022M20%2011L24%205M24%208L18%205M38%208L42%202%22%2F%3E%3C%2Fsvg%3E"); }

body.terra-design { --terra-motif-contours: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20128%2032%22%20fill%3D%22none%22%20stroke%3D%22%235f7a4b%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M10%2026Q25%201%2052%2013T118%206M20%2030Q34%209%2058%2020T120%2014M42%2030Q57%2020%2077%2028T118%2023%22%2F%3E%3C%2Fsvg%3E"); }

body.terra-design { --terra-motif-path: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20128%2032%22%20fill%3D%22none%22%20stroke%3D%22%235f7a4b%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M15%2027Q52%2027%2049%2016T103%205%22%2F%3E%3Cpath%20d%3D%22M26%2012L29%206M29%209L24%206M94%2026L98%2020M98%2023L92%2020%22%20stroke%3D%22%239a4f32%22%2F%3E%3C%2Fsvg%3E"); }
body.terra-design { --terra-motif-seedhead: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20128%2032%22%20fill%3D%22none%22%20stroke%3D%22%235f7a4b%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M48%2029Q52%2015%2043%203M61%2029Q62%2013%2071%202M73%2029Q81%2018%2093%2013M48%2017L38%2012M47%2012L51%207M64%2016L75%2011M67%2010L61%205M83%2020L94%2021M77%2025L76%2017%22%2F%3E%3Cpath%20d%3D%22M40%203L45%205M69%202L74%204M92%2012L96%2015%22%20stroke%3D%22%239a4f32%22%2F%3E%3C%2Fsvg%3E"); }

/* Mixed family: at most two marks per page, one per semantic role.
   Plain intervening sections provide breathing room. No repeated motif per page. */
body.terra-design[data-terra-design="mixed"] { --terra-accent-image: none; }
body.terra-design[data-terra-design="mixed"] .home-v2-welcome { --terra-accent-image: var(--terra-motif-sprig); }
body.terra-design[data-terra-design="mixed"] .home-v2-homes { --terra-accent-image: var(--terra-motif-rows); }
body.terra-design[data-terra-design="mixed"] .core-community .core-v2-principles { --terra-accent-image: var(--terra-motif-seedhead); }
body.terra-design[data-terra-design="mixed"] .core-community .tf-local-area { --terra-accent-image: var(--terra-motif-contours); }
body.terra-design[data-terra-design="mixed"] .homes-index-family .tf-local-area { --terra-accent-image: var(--terra-motif-path); }
body.terra-design[data-terra-design="mixed"] .homes-phase#phase-2 { --terra-accent-image: var(--terra-motif-rows); }
body.terra-design[data-terra-design="mixed"] .core-faq .core-v2-faq-group#faq-group-1 { --terra-accent-image: var(--terra-motif-seedhead); }
/* Mixed family scale and side assignments. Larger artwork stays inside the
   existing top padding; its shallow box never overlaps a section heading. */
body.terra-design[data-terra-design="mixed"] :is(.home-v2-welcome,.tf-local-area,.home-v2-homes,.core-v2-principles,.core-v2-story,.homes-phase,.core-v2-faq-group)::before {
 width: 9rem; height: 1.875rem; top: 0;
}
body.terra-design[data-terra-design="mixed"] :is(.home-v2-welcome,.core-community .core-v2-principles,.homes-index-family .tf-local-area,.core-faq .core-v2-faq-group#faq-group-1)::before {
 left: var(--terra-page-edge); right: auto;
}
/* The compact information band has 28px padding at the smallest widths.
   Keep a 4px clear gap while retaining the full 50% enlargement elsewhere. */
@media (max-width: 68rem) {
 body.terra-design[data-terra-design="mixed"] .tf-local-area::before { height: 1.5rem; width: 7.2rem; }
}
/* Live Here: caption belongs to the map's page grid, not a second inner gutter. */
body.terra-design .homes-map-caption { padding-inline: 0; }
/* Reuse the existing map details dialog for the mobile map viewer. */
.terra-map-toolbar,.terra-map-viewport,.terra-map-open { display: none; }
body.terra-design .terra-map-viewer[open] {
 position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none;
 margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden;
 display: grid; grid-template-rows: auto minmax(0,1fr); background: var(--cream);
}
body.terra-design .terra-map-viewer .terra-map-toolbar { display: block; grid-row: 1; padding: max(.75rem,env(safe-area-inset-top)) max(.75rem,env(safe-area-inset-right)) .75rem max(.75rem,env(safe-area-inset-left)); border-bottom: var(--terra-divider); }
body.terra-design .terra-map-viewer-title { font-size: 1.35rem; margin: 0 5rem .75rem 0; }
body.terra-design .terra-map-controls { display: flex; flex-wrap: wrap; gap: .4rem; }
body.terra-design .terra-map-controls button,body.terra-design .terra-map-open { min-height: 44px; padding: .5rem .7rem; border: 1px solid var(--moss); border-radius: 4px; background: var(--cream); color: var(--moss); font: inherit; }
body.terra-design .terra-map-viewer [data-map-dialog-close] { position: absolute; top: max(.5rem,env(safe-area-inset-top)); right: max(.75rem,env(safe-area-inset-right)); width: auto; min-width: 44px; height: 44px; padding-inline: .65rem; font-size: 1rem; border-radius: 4px; z-index: 10; }
body.terra-design .terra-map-viewer .terra-map-viewport { display: block; grid-row: 2; overflow: auto; min-height: 0; padding-bottom: env(safe-area-inset-bottom); touch-action: pan-x pan-y pinch-zoom; overscroll-behavior: contain; }
body.terra-design .terra-map-viewer .homes-map-canvas { min-width: 0; max-width: none; margin: 0; }
body.terra-design .terra-map-viewer .homes-site-map { max-width: none; }
body.terra-design .terra-map-viewer [data-map-dialog-content][hidden] { display: none; }
body.terra-design .terra-map-viewer:not(.terra-map-detail) .terra-map-controls button:first-child { display: none; }
body.terra-design .terra-map-viewer.terra-map-detail .terra-map-viewport { display: none; }
body.terra-design .terra-map-viewer.terra-map-detail [data-map-dialog-content] { grid-row: 2; overflow: auto; padding: 1rem max(1rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)); }
body.terra-design .terra-map-viewer.terra-map-detail .terra-map-controls button:not(:first-child) { display: none; }
body.terra-design :is(.terra-map-controls button,.terra-map-open,.terra-map-viewport):focus-visible { outline: 3px solid var(--clay); outline-offset: -3px; }
@media(max-width:48rem) {
 body.terra-design .homes-site-plan > .homes-map-scroll-frame { overflow: hidden; }
 body.terra-design .homes-site-plan > .homes-map-scroll-frame .homes-map-canvas { min-width: 0; }
 body.terra-design .homes-site-plan > .homes-map-scroll-frame .homes-site-map { height: clamp(180px,38vw,300px); width: 100%; object-fit: contain; }
 body.terra-design .homes-site-plan > .homes-map-scroll-frame button { visibility: hidden; }
 body.terra-design .terra-map-open:not([hidden]) { display: block; margin-block: .75rem; background: var(--garden); border-color: var(--garden); color: white; }
}
/* Fit the desktop map to the shared content frame; only the explicit viewer
   uses an enlarged, locally scrollable canvas. */
body.terra-design .homes-site-plan > .homes-map-scroll-frame .homes-map-canvas { min-width: 0; }
