/* Hub and place-page layout (2026-11 layout pass).

   Loaded only by the /edmonton/ and /condos/ hubs (feed/hub_layout.py) and
   the place pages that carry the sidebar boxes and the Browse row
   (feed/build_side_ctas.py): neighbourhood, neighbourhood subpage, zone and
   condo-building pages. Kept out of site.css on purpose: site.css is stamped
   into every listing page, so a change there re-uploads all of them.

   Colours are site.css's tokens (Eddie's greens); nothing here introduces a
   new one. Buttons are green only. Form controls stay at 16px or larger so
   iOS never zooms on focus. */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------ hub shell */
main.hub { padding-bottom: 0; }
.hub-wrap { width: min(1240px, calc(100% - 2 * var(--page-gutter))); margin-inline: auto; }
.hub-crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; padding: 0;
  font-size: 13px; color: var(--ink-3); }
.hub-crumbs li + li::before { content: "\203A"; margin-right: 6px; }
.hub-crumbs a { color: inherit; text-decoration: none; }
.hub-crumbs a:hover { color: var(--orange-deep); }

.hub-head { padding: 18px 0 clamp(36px, 5vw, 56px); max-width: 46.41em; }
.hub-head h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.06; letter-spacing: -0.025em;
  color: var(--blue-900); margin: 0 0 18px; max-width: 11.93em; }
.hub-head p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.6; }
.hub-lede { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; color: var(--ink-2); margin: 0; }
.hub-head .hub-lede { color: var(--ink); }
.hub a:not(.hub-btn):not(.hub-zone):not(.hub-card) { color: var(--orange-deep); }

.hub-sec { padding: clamp(48px, 6vw, 80px) 0; }
.hub-sec--tint { background: var(--orange-soft); }
.hub-sec--deep { background: var(--blue-900); color: #fff; }
.hub-sec--deep .hub-lede { color: rgba(255, 255, 255, 0.82); }
.hub-sec__head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 47.74em; }
.hub-sec h2 { font-size: clamp(24px, 2.8vw, 34px); line-height: 1.15; letter-spacing: -0.02em;
  color: var(--blue-900); margin: 0; }
.hub-sec--deep h2 { color: #fff; }
.hub-muted { color: var(--ink-3); font-size: 14px; }
.hub-aside { margin: -8px 0 24px; max-width: 53.04em; color: var(--ink-2); line-height: 1.6; }

/* ------------------------------------------------------------ buttons */
.hub-btn, .gb-cta__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--orange-deep);
  background: var(--orange-deep); color: #fff; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.hub-btn:hover, .gb-cta__btn:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.hub-btn--ghost, .gb-cta__btn--ghost { background: transparent; color: var(--orange-deep); }
.hub-btn--ghost:hover, .gb-cta__btn--ghost:hover { background: var(--orange-deep); color: #fff; }
.hub-btn--light { background: #fff; border-color: #fff; color: var(--blue-900); }
.hub-btn--light:hover { background: var(--orange-soft); border-color: var(--orange-soft); color: var(--blue-900); }
.hub-btn:focus-visible, .gb-cta__btn:focus-visible, .hub-zone:focus-visible, .hub-card:focus-visible {
  outline: 3px solid var(--blue-500); outline-offset: 3px; }

/* ------------------------------------------------------------ zone cards */
.hub-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.hub-zone { display: grid; gap: 12px; align-content: start; padding: 24px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--grid); color: var(--ink); text-decoration: none;
  scroll-margin-top: 100px; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
a.hub-zone:hover { border-color: var(--blue-500); box-shadow: 0 12px 30px -20px rgba(6, 64, 49, 0.5); }
.hub-zone h3 { font-size: 20px; line-height: 1.25; color: var(--blue-900); margin: 0; }
.hub-zone p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.hub-zone dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 0;
  padding-top: 14px; border-top: 1px solid var(--grid); }
.hub-zone dt { font-size: 12px; color: var(--ink-3); }
.hub-zone dd { margin: 2px 0 0; font-size: 22px; font-weight: 700; color: var(--blue-900); letter-spacing: -0.01em; }
.hub-zone__top { font-size: 13px; color: var(--ink-3); }
.hub-zone__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 4px; }
.hub-zone__actions .hub-btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.hub-zone__actions a { font-size: 14px; }

/* ------------------------------------------------------------ filters + table */
.hub-filters { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-end; margin: 0 0 22px; }
.hub-filters fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.hub-filters legend, .hub-field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 8px; padding: 0; }
.hub-field input, .hub-field select {
  font: inherit; font-size: 16px; min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid #cfd6d3; background: #fff; color: var(--ink); width: 240px; max-width: 100%;
  -webkit-appearance: none; appearance: none;
}
.hub-field select { padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
  linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.hub-field input:focus, .hub-field select:focus { outline: 2px solid var(--blue-500); outline-offset: 1px; }
.hub-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-seg label { position: relative; }
.hub-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hub-seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid #cfd6d3; background: #fff; font-size: 14px; white-space: nowrap; cursor: pointer; }
.hub-seg input:checked + span { background: var(--orange-deep); border-color: var(--orange-deep); color: #fff; }
.hub-seg input:focus-visible + span { outline: 2px solid var(--blue-500); outline-offset: 2px; }

.hub-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
.hub-count strong { font-size: 18px; color: var(--blue-900); }
.hub-tablewrap { background: #fff; border: 1px solid var(--grid); border-radius: var(--radius); overflow: hidden; }
.hub-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hub-table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0;
  border-bottom: 1px solid var(--grid); background: var(--surface); white-space: nowrap; }
.hub-table th button { all: unset; display: block; padding: 12px 14px; cursor: pointer; }
.hub-table th button:focus-visible { outline: 2px solid var(--blue-500); outline-offset: -2px; }
.hub-table th[aria-sort] button { color: var(--blue-900); }
.hub-table th[aria-sort="ascending"] button::after { content: " \2191"; }
.hub-table th[aria-sort="descending"] button::after { content: " \2193"; }
.hub-table td { padding: 12px 14px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.hub-table tr:last-child td { border-bottom: 0; }
.hub-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.hub-table th.num button { text-align: right; }
.hub-table td a { font-weight: 600; text-decoration: none; }
.hub-table td a:hover { text-decoration: underline; }
.hub-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--orange-soft);
  color: var(--blue-900); font-size: 12px; font-weight: 600; }
.hub-meter { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.hub-meter i { display: inline-block; width: 56px; height: 6px; border-radius: 3px; background: var(--grid);
  background-image: linear-gradient(var(--blue-500), var(--blue-500)); background-repeat: no-repeat;
  background-size: var(--v) 100%; }
.hub-empty { padding: 18px 0; color: var(--ink-2); }
.hub-more { display: flex; justify-content: center; margin-top: 18px; }
.hub-notes { display: grid; gap: 6px; margin: 22px 0 0; max-width: 53.04em; font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.hub-notes dt { display: inline; font-weight: 600; color: var(--ink-2); }
.hub-notes dd { display: inline; margin: 0; }

@media (max-width: 760px) {
  .hub-filters { gap: 16px; }
  .hub-field, .hub-field input, .hub-field select { width: 100%; }
  .hub-tablewrap { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .hub-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hub-table, .hub-table tbody, .hub-table tr, .hub-table td { display: block; width: 100%; }
  .hub-table tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; background: #fff;
    border: 1px solid var(--grid); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
  .hub-table tr[hidden] { display: none; }
  .hub-table td { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0;
    border-bottom: 0; text-align: right; min-width: 0; }
  .hub-table td:first-child { grid-column: 1 / -1; font-size: 17px; text-align: left; padding-bottom: 8px;
    margin-bottom: 4px; border-bottom: 1px solid var(--grid); }
  .hub-table td:first-child::before { content: none; }
  .hub-table td::before { content: attr(data-label); color: var(--ink-3); font-size: 13px; text-align: left; }
  .hub-meter i { width: 36px; }
}

/* ------------------------------------------------------------ more ways */
.hub-starts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 28px; }
.hub-starts h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin: 0 0 12px; }
.hub-starts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hub-starts li a { display: block; padding: 8px 0; border-bottom: 1px solid var(--grid); text-decoration: none; font-weight: 500; }
.hub-starts li a:hover { text-decoration: underline; }
.hub-orphans { margin-top: 48px; }
.hub-orphans h3 { font-size: 20px; color: var(--blue-900); margin: 0 0 6px; }
.hub-orphans > p { margin: 0 0 12px; color: var(--ink-2); }

/* ------------------------------------------------------------ guides */
.hub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.hub-card { display: grid; gap: 12px; text-decoration: none; color: var(--ink); }
.hub-card figure { margin: 0; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.hub-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.hub-card:hover img { transform: scale(1.03); }
.hub-card h3 { font-size: 18px; line-height: 1.3; color: var(--blue-900); margin: 0; }
@media (prefers-reduced-motion: reduce) { .hub-card img { transition: none; } .hub-card:hover img { transform: none; } }

/* ------------------------------------------------------------ directory */
.hub-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.hub-jump a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px;
  border-radius: 10px; background: #fff; border: 1px solid var(--grid); text-decoration: none; font-weight: 600; }
.hub-jump a:hover { border-color: var(--blue-500); }
.hub-dir { display: grid; gap: 32px; }
.hub-dir__letter { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  column-gap: 28px; row-gap: 20px; scroll-margin-top: 100px; padding-top: 20px; border-top: 1px solid rgba(6, 64, 49, 0.15); }
.hub-dir__l { grid-column: 1 / -1; font-size: 28px; color: var(--blue-900); margin: 0; }
.hub-dir__hood h4 { font-size: 15px; color: var(--ink); margin: 0 0 6px; }
.hub-dir__hood ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 15px; }
.hub-dir__hood a { text-decoration: none; }
.hub-dir__hood a:hover { text-decoration: underline; }
.hub-dir__act { color: var(--ink-3); font-size: 13px; white-space: nowrap; }

/* ------------------------------------------------------------ condo documents */
.hub-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hub-split > div { display: grid; gap: 18px; }
.hub-work { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, 0.35); }
.hub-work li { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.hub-work strong { font-size: 17px; }
.hub-work span { color: rgba(255, 255, 255, 0.78); font-size: 15px; }

/* ------------------------------------------------------------ ask Eddie */
.hub-close { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.hub-close__portrait img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); display: block; }
.hub-close h2 { margin-bottom: 16px; }
.hub-close p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.6; max-width: 46.41em; }
.hub-close p:first-of-type { font-size: 17px; color: var(--ink); }
.hub-close__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 700px) {
  .hub-close { grid-template-columns: 1fr; }
  .hub-close__portrait { max-width: 160px; }
}

/* ------------------------------------------------------------ Browse row */
.com-browse { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -12px 0 28px; }
.com-browse__h { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.com-browse a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--grid); background: #fff; color: var(--blue-900);
  font-size: 14px; font-weight: 600; text-decoration: none; }
.com-browse a:hover { border-color: var(--blue-500); background: var(--orange-soft); }
.com-browse a span { font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ sidebar boxes */
.gb-with-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 1080px) {
  .gb-with-side { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
  .gb-side { position: sticky; top: 96px; }
}
.gb-with-side__main > :first-child { margin-top: 0; }
.gb-side { display: grid; gap: 16px; align-content: start; }
.gb-cta { padding: 22px; border-radius: var(--radius); border: 1px solid var(--grid); background: #fff; }
.gb-cta--account { background: var(--orange-soft); border-color: transparent; }
.gb-cta h2 { font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; color: var(--blue-900); margin: 0 0 8px; }
.gb-cta p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.gb-cta__tag { font-size: 12px !important; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--blue-500) !important; margin-bottom: 6px !important; }
.gb-cta__ticks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 7px; font-size: 14px; }
.gb-cta__ticks li { position: relative; padding-left: 24px; line-height: 1.4; }
.gb-cta__ticks li::before { content: ""; position: absolute; left: 3px; top: 3px; width: 6px; height: 11px;
  border: solid var(--orange-deep); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.gb-cta .gb-cta__btn { width: 100%; }
.gb-cta__fine { font-size: 13px !important; color: var(--ink-3) !important; margin: 12px 0 0 !important; }
.gb-cta__fine a, .gb-cta p a { color: var(--orange-deep); }
.gb-cta form { display: grid; gap: 8px; }
.gb-cta label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gb-cta input { font: inherit; font-size: 16px; min-height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid #cfd6d3; width: 100%; -webkit-appearance: none; appearance: none; }
.gb-cta input:focus { outline: 2px solid var(--blue-500); outline-offset: 1px; }
.gb-cta__reads { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 15px; }
.gb-cta__reads a { display: block; padding: 8px 0; border-bottom: 1px solid var(--grid); color: var(--orange-deep);
  text-decoration: none; font-weight: 500; line-height: 1.35; }
.gb-cta__reads li:last-child a { border-bottom: 0; }
.gb-cta__reads a:hover { text-decoration: underline; }
.gb-cta__who { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.gb-cta__who img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none; }
.gb-cta__who h2 { margin: 0 0 2px; }
.gb-cta__who span { font-size: 13px; color: var(--ink-3); }
.gb-cta__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gb-cta__actions .gb-cta__btn:first-child { grid-column: 1 / -1; }
.gb-cta__actions .gb-cta__btn { min-height: 44px; padding: 0 12px; }

/* The sidebar stack sits inside main.condo pages whose sections carry their own
   top margins; the grid's own gap replaces the first one. */
.gb-with-side__main > .results-head:first-child, .gb-with-side__main > #com-filter:first-child + .results-head { margin-top: 0; }

/* ------------------------------------------------------------ late filter box
   js/result-filter.js draws "Narrow the list" into #com-filter / #zone-filter
   after load, which pushed the cards down (layout shift). Hold its measured
   height while the box is still empty; once drawn, its own height takes over. */
#com-filter:empty { min-height: 175px; }
#zone-filter:empty { min-height: 185px; }
@media (min-width: 1600px) { #com-filter:empty, #zone-filter:empty { min-height: 113px; } }
@media (max-width: 759px) { #com-filter:empty { min-height: 191px; } #zone-filter:empty { min-height: 249px; } }
@media (max-width: 559px) { #com-filter:empty { min-height: 324px; } #zone-filter:empty { min-height: 393px; } }
