/* Market hub, place hub (place.html, market.html) and the areas directory
   (areas.html); the place list (_place_list.html) they share. */
@layer page {
  .hub, .areas { padding-bottom: var(--sp-6); }

  /* Head: the title and the live figures as a strip of numerals. Mobile: a
     two-column grid of tiles; from 48em three; from 64em one row, hairlines
     between the tiles. The numeral comes first visually, the label (dt)
     stays first in the markup. */
  .hub__head, .areas__head { padding-top: var(--sp-3); }
  .hub__intro { max-width: 46rem; margin-top: var(--sp-3); }
  .hub__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--sp-5); border-bottom: 1px solid var(--line); }
  .hub__stats > div { display: grid; align-content: start; gap: 0.1rem; padding: var(--sp-3) var(--sp-3) var(--sp-3) 0; border-top: 1px solid var(--line); min-width: 0; }
  .hub__stats dt { order: 2; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.3; }
  .hub__stats dd { font-size: var(--fs-xl); font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
  .hub__checked { margin-top: var(--sp-3); }
  .hub time { white-space: nowrap; }
  @media (min-width: 48em) {
    .hub__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @media (min-width: 64em) {
    .hub__stats { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); }
    .hub__stats > div { border-top: 0; border-left: 1px solid var(--line); padding: var(--sp-4) var(--sp-6) var(--sp-4) var(--sp-4); min-width: 9rem; }
    .hub__stats > div:first-child { border-left: 0; padding-left: 0; }
    .hub__stats dd { font-size: var(--fs-2xl); }
  }

  /* Notice (sold-out): one line, the icon aligned with the first line. */
  .hub__notice { margin-top: var(--sp-5); align-items: flex-start; }
  .hub__notice .icon { margin-top: 0.15em; }
  .hub__notice p { max-width: none; }

  /* Sections */
  .hub__section { margin-top: var(--sp-7); }
  .hub__all { margin-top: var(--sp-5); }
  .empty .cluster { justify-content: center; }

  /* Place list: one link per row; name and counts left, the price right.
     `places--cols`: two columns from 48em, each row kept whole. */
  .places { border-top: 1px solid var(--line); }
  .places__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto; column-gap: var(--sp-3); align-items: center; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
  .places__name { grid-column: 1; grid-row: 1; font-weight: 650; }
  .places__meta { grid-column: 1; grid-row: 2; font-size: var(--fs-s); color: var(--ink-2); }
  .places__meta:empty { display: none; }
  .places__price { grid-column: 2; grid-row: 1 / 3; text-align: right; white-space: nowrap; font-weight: 650; }
  .places__from { font-weight: 400; color: var(--ink-2); font-size: var(--fs-xs); }
  .places__row .icon { grid-column: 3; grid-row: 1 / 3; color: var(--ink-3); }
  .places__row:hover { color: var(--ink); }
  .places__row:hover .places__name { text-decoration: underline; text-underline-offset: 0.14em; }
  .places__row:hover .icon { color: var(--ink); }
  @media (min-width: 48em) {
    .places--cols { columns: 2; column-gap: var(--sp-7); }
    .places--cols > li { break-inside: avoid; }
  }

  /* Guide: the owner's text at reading width, the byline closing it. */
  .hub__guide h2 { font-size: var(--fs-xl); }
  .hub__guide-section { margin-top: var(--sp-5); }
  .hub__guide-section h3 { margin-bottom: var(--sp-2); }
  .hub__faqs { margin-top: var(--sp-6); max-width: var(--measure); }
  .hub__faqs h3 { margin-bottom: var(--sp-3); }
  .hub__faq { border-top: 1px solid var(--line); padding: var(--sp-3) 0; }
  .hub__faq:last-child { border-bottom: 1px solid var(--line); }
  .hub__faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--sp-3); }
  .hub__faq summary::-webkit-details-marker { display: none; }
  .hub__faq summary::after { content: "+"; color: var(--ink-3); flex: none; font-weight: 400; }
  .hub__faq[open] summary::after { content: "–"; }
  .hub__faq .prose { margin-top: var(--sp-2); color: var(--ink-2); }
  .hub__byline { margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--line); max-width: var(--measure); }
  .hub__byline a { color: inherit; }

  /* Comparisons: linked rows with a one-line snippet. */
  .hub__compare { border-top: 1px solid var(--line); }
  .hub__compare-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-3); align-items: center; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
  .hub__compare-title { font-weight: 650; }
  .hub__compare-snippet { grid-column: 1; font-size: var(--fs-s); color: var(--ink-2); }
  .hub__compare-row .icon { grid-column: 2; grid-row: 1 / 3; color: var(--ink-3); }
  .hub__compare-row:hover .hub__compare-title { text-decoration: underline; text-underline-offset: 0.14em; }

  /* The resale line */
  .hub__more { margin-top: var(--sp-6); display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4) var(--sp-5); max-width: none; }
  .hub__more .icon { color: var(--ink-2); margin-top: 0.15em; }

  /* Lead panel: the ask and the agent on the left, the form on the right
     from 64em; the copy stays in view while the form scrolls. */
  .hub__lead { margin-top: var(--sp-7); display: grid; gap: var(--sp-5); align-items: start; }
  .hub__lead h2 { font-size: var(--fs-xl); }
  .hub__lead .agent { margin-top: var(--sp-4); }
  .hub__lead .lead-panel__alt { margin-top: var(--sp-4); }
  .hub__lead .form__note { margin: 0; }
  @media (min-width: 64em) {
    .hub__lead { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--sp-7); padding: var(--sp-6); }
    .hub__lead-copy { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
  }

  /* Areas directory: a market with its figures, then its places; from 64em
     the market on the left (sticky) and the places, in two columns, right. */
  .areas__head .section__lead { margin-top: var(--sp-3); }
  .areas__market { margin-top: var(--sp-7); padding-top: var(--sp-6); border-top: 1px solid var(--line-2); display: grid; gap: var(--sp-5); align-items: start; }
  .areas__market h2 a { color: inherit; text-decoration: none; }
  .areas__market h2 a:hover { text-decoration: underline; text-underline-offset: 0.14em; }
  .areas__facts { margin-top: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .areas__open { margin-top: var(--sp-4); }
  .areas__empty { margin-top: var(--sp-6); }
  @media (min-width: 64em) {
    .areas__market { grid-template-columns: 18rem minmax(0, 1fr); gap: var(--sp-7); }
    .areas__market-head { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
  }
}
