/* Shared header/footer consume the same canonical palette as every page. */

:where(.hp-header, .hp-footer) {
  --hp-ink:var(--sp-text);
  --hp-accent:var(--sp-primary);
  --hp-link:var(--sp-secondary);
  --hp-highlight:var(--sp-highlight);
  --hp-muted:var(--sp-muted);
  --hp-line:var(--sp-border);
  --hp-gutter:clamp(1rem, 3vw, 2rem);
  color:var(--hp-ink);
  font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:1rem;
  line-height:1.55;
}
:where(.hp-header, .hp-footer) a { text-decoration:none; }
:where(.hp-header, .hp-footer) a:hover { text-decoration:underline; }
.sp-site-shell :where(.hp-header, .hp-footer) :is(a, button):focus-visible { outline:3px solid var(--hp-link); outline-offset:3px; }
.hp-wrap { width:min(calc(100% - var(--hp-gutter) * 2), 76rem); margin-inline:auto; }
.hp-button { display:inline-flex; align-items:center; justify-content:center; gap:.625rem; min-height:48px; padding:.75rem 1.25rem; border:1px solid var(--hp-accent); border-radius:6px; background:var(--hp-accent); color:var(--sp-on-primary); font:inherit; font-size:.9375rem; font-weight:700; cursor:pointer; line-height:1.4; text-align:center; min-width:0; overflow-wrap:anywhere; }
.hp-button--light { background:var(--sp-surface); color:var(--hp-ink); border-color:var(--sp-on-primary); }
.sp-site-shell .hp-button:not(.hp-button--light):hover { background:color-mix(in srgb, var(--hp-accent) 84%, black); color:var(--sp-on-primary); text-decoration:none; }
.hp-label { display:inline-block; width:fit-content; border-radius:4px; padding:.375rem .75rem; background:var(--hp-highlight); color:var(--sp-on-highlight); font-size:.75rem; font-weight:800; line-height:1.3; }
.sp-site-shell .hp-header { position:sticky; top:0; background:var(--sp-surface); box-shadow:none; border-bottom:1px solid var(--hp-line); }
.admin-bar.sp-site-shell .hp-header { top:32px; }
.hp-header__inner { position:relative; display:flex; align-items:center; gap:clamp(.75rem, 1.5vw, 1.5rem); min-height:76px; padding-block:.625rem; }
.hp-brand { display:flex; align-items:center; gap:.625rem; min-width:0; color:var(--hp-ink); line-height:1.2; letter-spacing:-.025em; }
.hp-brand > .sp-icon { flex:none; width:2.5rem; height:2.5rem; color:var(--hp-accent); }
.hp-brand > img { flex:none; width:2.5rem; height:2.5rem; object-fit:contain; }
.hp-brand > span { min-width:0; }
.hp-brand strong { display:block; font-size:1.1875rem; font-weight:750; overflow-wrap:anywhere; }
.hp-brand small { display:block; font-size:.8125rem; letter-spacing:0; font-weight:400; margin-top:.25rem; color:var(--hp-muted); }
.hp-header .hp-brand small { display:none; }
.hp-header__city { font-size:.8125rem; white-space:nowrap; }
.hp-header__nav { flex:1; min-width:0; }
.hp-header__nav ul { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:.25rem 1.25rem; margin:0; padding:0; list-style:none; }
.hp-header__nav a, .hp-header__account { color:var(--hp-ink); font-size:.875rem; }
.hp-header__nav a { display:inline-flex; align-items:center; min-height:44px; }
.hp-header__account { display:inline-flex; flex:none; align-items:center; gap:.375rem; min-height:44px; white-space:nowrap; }
.hp-header__account .sp-icon { font-size:1.25rem; }
.hp-header__post { flex:none; min-height:44px; padding:.625rem .75rem; font-size:.875rem; gap:.375rem; white-space:nowrap; }
.hp-header__post .hp-label { padding:.125rem .25rem; font-size:.625rem; }
.sp-site-shell .hp-header__toggle { display:none; flex:none; justify-content:center; min-width:44px; min-height:44px; border:0; padding:.5rem; color:var(--hp-ink); background:var(--sp-surface); font-size:1.5rem; }
.hp-footer { border-top:1px solid var(--hp-line); padding:1.5rem 0; color:var(--hp-ink); background:var(--sp-surface); }
.hp-footer__grid > * { min-width:0; overflow-wrap:anywhere; }
.hp-footer__grid { display:grid; grid-template-columns:1.5fr 1fr 1fr 1.5fr; gap:1.5rem; }
.hp-footer__grid > div + div, .hp-footer__help { border-left:1px solid var(--hp-line); padding-left:1.5rem; min-width:0; }
.hp-footer h2 { font-size:.9375rem; line-height:1.4; margin:0 0 .625rem; }
.hp-footer ul { list-style:none; padding:0; margin:0; font-size:.875rem; line-height:1.6; }
.hp-footer li { margin-block:.25rem; }
.hp-footer a { color:var(--hp-muted); }
.hp-footer .hp-brand { color:var(--hp-ink); gap:.5rem; }
.hp-footer .hp-brand > .sp-icon { width:2rem; height:2rem; }
.hp-footer .hp-brand strong { font-size:1rem; }
.hp-footer .hp-brand small { font-size:.8125rem; }
.hp-footer p { font-size:.75rem; color:var(--hp-muted); margin:1rem 0 0; line-height:1.6; }
.hp-footer__help ul { display:flex; flex-wrap:wrap; gap:.25rem 1rem; }
@media (max-width: 1200px) {
.hp-header__city { display:none; }
.hp-header__inner { gap:1rem; }
.hp-header__nav ul { gap:.25rem .875rem; }
}
@media (max-width: 1024px) {
.hp-header__inner { flex-wrap:wrap; min-height:72px; padding-block:.75rem; }
.hp-header .hp-brand { margin-right:auto; }
.hp-header .hp-brand small { display:flex; align-items:center; gap:.25rem; }
.hp-header__nav { order:5; flex-basis:100%; padding-top:.5rem; }
.hp-header__nav ul { justify-content:flex-start; gap:.25rem 1.5rem; }
.site-header--enhanced .hp-header__nav { display:none; }
.site-header--enhanced .hp-header__nav.is-open { display:block; }
.sp-site-shell .site-header--enhanced .hp-header__toggle { display:inline-flex; }
.hp-footer__grid { grid-template-columns:1.4fr 1fr 1fr; }
.hp-footer__help { grid-column:1 / -1; padding:1rem 0 0; border-left:0; border-top:1px solid var(--hp-line); }
}
@media (max-width: 767px) {
.admin-bar.sp-site-shell .hp-header { top:46px; }
.hp-footer__grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.hp-footer__brand { grid-column:1 / -1; }
.hp-footer__grid > div + div { border:0; padding-left:0; }
.hp-footer__help { grid-column:1 / -1; }
}
@media (max-width: 600px) {
.hp-header__inner { min-height:68px; gap:.375rem; padding-block:.625rem; }
.hp-header .hp-brand strong { font-size:1.0625rem; }
.hp-header .hp-brand small { font-size:.75rem; }
.hp-header .hp-brand > .sp-icon, .hp-header .hp-brand > img { width:2.125rem; height:2.125rem; }
.hp-header__account { justify-content:center; width:44px; }
.hp-header__account .sp-icon { font-size:1.375rem; }
.hp-header__account > span, .hp-header__post { display:none; }
}
@media (max-width: 359px) {
.hp-header .hp-brand { gap:.375rem; }
.hp-header .hp-brand strong { font-size:1rem; }
.hp-header .hp-brand > .sp-icon, .hp-header .hp-brand > img { width:1.875rem; height:1.875rem; }
}
/* Keep footer links above the discovery page's fixed mobile controls. */
@media (max-width: 700px) {
  .sp-listing-page .hp-footer { padding-bottom:calc(1.5rem + 58px + env(safe-area-inset-bottom)); }
}

.hp-brand strong,.hp-footer h2 { color:var(--sp-heading); }
