/* Shared public typography, based on the homepage. */
:root {
  --site-font-family: Georgia, "Times New Roman", serif;
  --site-title-size: clamp(4rem, 5.35vw, 5.55rem);
  --site-section-size: clamp(3rem, 5vw, 5.15rem);
  --site-subheading-size: 1.7rem;
  --site-body-size: 1rem;
  --site-intro-size: 1.02rem;
  --site-lead-size: clamp(1.5rem, 2.2vw, 2.05rem);
}
/* Use one family across public pages, including controls and the wordmark.
   The important layer also covers legacy font shorthands while preserving weight. */
@layer public-font-family {
  :is(.site-typography, .ref-page, .public-properties, .public-listing-detail),
  :is(.site-typography, .ref-page, .public-properties, .public-listing-detail) * {
    font-family: var(--site-font-family) !important;
  }
}

.site-typography { font-size: 16px; }
:is(.site-typography main, .ref-page, .public-properties, .public-listing-main) h1 {
  font-size: var(--site-title-size)!important; font-weight: 400!important;
  line-height: 1!important; letter-spacing: -.045em!important;
  overflow-wrap: break-word; text-align: left;
}
:is(.site-typography .section-title, .ref-page .ref-intro h2) {
  font-size: var(--site-section-size)!important; font-weight: 400!important;
  line-height: 1.06!important; letter-spacing: -.045em!important;
}
:is(.site-typography.legal-simple main h2, .site-typography .legal-section h2,
.site-typography .commission-details h2, .site-typography .side-card h2,
.site-typography .article-main h2, .ref-page .ref-terms h2) {
  font-size: var(--site-subheading-size)!important; font-weight: 400!important; line-height: 1.2!important;
}
:is(.site-typography .hero-lead, .site-typography .hero > .wrap p:not(.kicker):not(.prelaunch),
.site-typography .intro > p, .site-typography .intro-copy,
.ref-page .ref-hero > div > p:not(.eyebrow), .public-properties-hero > p) {
  font-size: var(--site-intro-size)!important; line-height: 1.65!important;
}
:is(.site-typography .copy p:not(.lead):not(.small),
.site-typography .article-main p, .site-typography .legal-section p:not(.small),
.site-typography .legal-section li, .site-typography.legal-simple main p,
.site-typography .commission-summary p:not(.kicker):not(.commission-tax),
.site-typography .commission-details p, .ref-page .ref-terms p, .ref-page .ref-terms li) {
  font-size: var(--site-body-size)!important; line-height: 1.65!important;
}
.site-typography .copy .lead {
  font-size: var(--site-lead-size)!important; line-height: 1.46!important;
}
.public-listing-lead, .public-listing-main article p {
  font-size: var(--site-body-size)!important; line-height: 1.65!important;
}
@media (max-width: 1000px) {
  :root { --site-title-size: 4.25rem; }
}
@media (max-width: 800px) {
  :root { --site-title-size: clamp(3.3rem, 9.5vw, 4.65rem); }
}
@media (max-width: 600px) {
  :root {
    --site-title-size: clamp(2.45rem, 11vw, 3rem);
    --site-section-size: 2.65rem;
    --site-subheading-size: 1.42rem;
    --site-intro-size: 1rem;
    --site-body-size: .94rem;
    --site-lead-size: 1.42rem;
  }
}

/* Shared outer edges for all public pages; legal text keeps a readable measure. */
@media screen {
  :root { --site-container-width: min(1320px, calc(100% - 72px)); --site-container-edge: max(36px, calc((100% - 1320px) / 2)); }
  :is(.site-typography .wrap, .site-typography .hero-trust,
      .site-header .nav, .site-footer .footer-row,
      .ref-page .ref-header, .ref-page .ref-hero, .ref-page .ref-steps,
      .ref-page .ref-main, .ref-page .ref-terms, .ref-page .ref-footer,
      .public-property-header, .public-property-footer, .public-properties-hero,
      .public-property-grid, .public-listing-gallery, .public-listing-content) {
    width: var(--site-container-width)!important;
    margin-inline: auto!important;
  }
  :is(.site-typography.legal-simple main .wrap, .ref-page .public-legal-terms) {
    width: min(920px, var(--site-container-width))!important;
    max-width: none;
    margin-inline: auto!important;
  }
}
@media screen and (max-width: 1000px) {
  :root { --site-container-width: calc(100% - 40px); --site-container-edge: 20px; }
}
@media screen and (max-width: 600px) {
  :root { --site-container-width: calc(100% - 32px); --site-container-edge: 16px; }
}

/* Keep mobile text columns inside the same outer edges as the contact area. */
@media screen and (max-width: 860px) {
  .site-typography :is(.portrait-layout, .split, .intro-grid, .contact-grid) {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-typography :is(.wrap, .portrait-layout, .split, .intro-grid, .contact-grid) > * {
    min-width: 0;
    max-width: 100%;
  }
  .site-typography :is(h1, .section-title) {
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 0;
    overflow-wrap: anywhere;
  }
}
