/* ═══ My Home Hub pages (/my, /my/searches, /my/favourites, /my/homes, /my/messages,
   /my/account — Pages/Hub.cshtml + wwwroot/js/hub/hub.js). Plain CSS on the site's design
   tokens (--bg, --ink, --accent, --card, --font-display, --font-body from _SiteChromeHead), so
   the hub wears whatever design the website has. Soft tones are mixed from those tokens. ═══ */
.al-hub { --hub-line: color-mix(in srgb, var(--ink) 14%, transparent);
    --hub-soft: color-mix(in srgb, var(--ink) 6%, var(--card));
    --hub-muted: color-mix(in srgb, var(--ink) 68%, var(--card));
    --hub-accent-soft: color-mix(in srgb, var(--accent) 14%, var(--card));
    --hub-accent-ink: color-mix(in srgb, var(--accent) 70%, var(--ink));
    --hub-warm-soft: #FFF1DD; --hub-warm-ink: #5C3200;
    font-family: var(--font-body); color: var(--ink); font-size: 16px; line-height: 1.45; }
.al-hub *, .al-hub *::before, .al-hub *::after { box-sizing: border-box; }
.al-hub a { color: inherit; }
.al-hub [hidden] { display: none !important; }
.al-hub-wrap { max-width: 1240px; margin: 0 auto; padding: 40px 24px 72px; }
.al-hub-loading { padding: 80px 0; text-align: center; color: var(--hub-muted); }

.hub-stack { display: flex; flex-direction: column; gap: 44px; }
.hub-stack.hub-narrow { max-width: 720px; gap: 24px; }
.hub-col { display: flex; flex-direction: column; gap: 14px; }
.hub-card { background: var(--card); border: 1px solid var(--hub-line); border-radius: 16px; }
.hub-pad { padding: 22px; }
.hub-muted { color: var(--hub-muted); }
.hub-small { font-size: 14px; }
.hub-strong { font-weight: 700; }
.hub-break { overflow-wrap: anywhere; }
.hub-right { text-align: right; flex: none; }
.hub-inline { display: flex; align-items: center; gap: 10px; }
.hub-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hub-muted); }
.al-hub h1.display { margin: 0; font-size: 44px; line-height: 1.1; }
.al-hub h2.display { margin: 0; font-size: 28px; line-height: 1.15; }
.al-hub h2.hub-h2-sm { font-size: 24px; }
.hub-h3 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.25; font-family: var(--font-body); }
.hub-h4 { margin: 0; font-size: 17px; font-weight: 700; font-family: var(--font-body); }
.hub-lead { margin: 10px 0 0; font-size: 18px; color: var(--hub-muted); }
.hub-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.hub-head a { font-weight: 600; }
.hub-title-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; }

/* buttons */
.hub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
    border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none;
    cursor: pointer; white-space: nowrap; transition: filter .12s ease, background .12s ease; }
.hub-btn:disabled { opacity: .55; cursor: default; }
.hub-btn-accent { background: var(--accent); color: #fff !important; }
.hub-btn-ink { background: var(--ink); color: var(--card) !important; }
.hub-btn-line { background: var(--card); color: var(--ink); border-color: color-mix(in srgb, var(--ink) 30%, transparent); font-weight: 600; }
.hub-btn-accent:hover:not(:disabled), .hub-btn-ink:hover:not(:disabled) { filter: brightness(1.1); }
.hub-btn-line:hover:not(:disabled) { background: var(--hub-soft); }
.hub-btn-left { justify-content: flex-start; white-space: normal; text-align: left; padding: 10px 14px; font-weight: 500; }
.hub-btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hub-btn-row.hub-end { justify-content: flex-end; }
.hub-grow { flex: 1 1 auto; }
.al-hub :focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }

/* pills + notices */
.hub-pill { flex: none; display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 11px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.hub-pill-accent { background: var(--hub-accent-soft); color: var(--hub-accent-ink); }
.hub-pill-warm { background: var(--hub-warm-soft); color: var(--hub-warm-ink); }
.hub-notice { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px;
    background: var(--hub-warm-soft); color: var(--hub-warm-ink); font-size: 15px; margin-bottom: 14px; }
.hub-notice > div { flex: 1 1 280px; }
.hub-notice svg { flex: none; margin-top: 1px; }
.hub-notice-accent { background: var(--hub-accent-soft); color: var(--hub-accent-ink); align-items: center; margin-bottom: 0; }
.hub-notice-accent a { color: inherit; }
.hub-error { color: #9B1C1C; font-size: 14px; margin: 0; }

/* hero */
.hub-hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.hub-hero-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hub-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.hub-stat { flex: 1 1 200px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.hub-stat-n { font-family: var(--font-display); font-size: 34px; line-height: 1; font-weight: 600; }
.hub-agent { flex: 1 1 320px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.hub-agent-who { display: flex; align-items: center; gap: 14px; }
.hub-agent-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.hub-agent-initials { display: flex; align-items: center; justify-content: center; background: var(--hub-accent-soft); color: var(--hub-accent-ink); font-weight: 700; font-size: 20px; }
.hub-agent-name { font-weight: 700; font-size: 19px; }
.hub-agent .hub-btn { flex: 1 1 120px; }
.hub-col > .hub-agent { flex: none; }

/* grids */
.hub-grid { display: grid; gap: 16px; }
.hub-grid-3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.hub-grid-2 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.hub-two { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.hub-two-main { flex: 999 1 560px; min-width: 0; }
.hub-two-side { flex: 1 1 340px; min-width: 0; }
aside.hub-card.hub-two-side { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
aside.hub-card.hub-two-side .hub-head { margin-bottom: 0; }
.hub-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; padding: 20px;
    border: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 16px; text-decoration: none; font-weight: 700; text-align: center; }
.hub-add:hover { background: var(--hub-soft); }
.hub-add .hub-muted { font-weight: 400; }
.hub-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 24px; }
.hub-empty > div { flex: 1 1 240px; }
.hub-skeleton-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.hub-skeleton { min-height: 150px; border-radius: 16px; background: var(--hub-soft); animation: hubPulse 1.4s ease-in-out infinite; }
.hub-skeleton-tall { min-height: 360px; }
@keyframes hubPulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .hub-skeleton { animation: none; } }

/* saved-search card */
.hub-search { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.hub-search-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hub-search h3 { margin: 0; font-size: 19px; font-weight: 700; font-family: var(--font-body); }

/* favourite card */
.hub-fav { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.hub-fav-link { display: flex; flex-direction: column; text-decoration: none; flex: 1; }
.hub-fav-link[aria-disabled="true"] { cursor: default; }
.hub-fav-photo { position: relative; height: 160px; background: var(--hub-soft); }
.hub-fav-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-fav-off .hub-fav-photo img { filter: grayscale(1); opacity: .7; }
.hub-flag { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
    background: var(--card); color: var(--ink); border: 1px solid var(--hub-line); font-size: 13px; font-weight: 700; }
.hub-fav-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.hub-price { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.hub-fav-remove { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hub-line);
    background: var(--card); color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* homes + value */
.hub-home-mini { padding: 20px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; }
.hub-home-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 10px; align-items: flex-start; }
.hub-value { display: flex; flex-direction: column; gap: 10px; }
.hub-value p { margin: 0; }
.hub-value-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 36px; }
.hub-figure { font-family: var(--font-display); font-size: 32px; line-height: 1.1; font-weight: 600; }
.hub-figure-lg { font-size: 46px; }
.hub-trend { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.hub-strong.hub-trend { font-size: 18px; }
.hub-trend-up { color: var(--hub-accent-ink); }
.hub-trend-down { color: #7A3E00; }
.hub-chart { width: 100%; height: auto; display: block; }
.hub-chart-small { width: 150px; flex: none; }
.hub-chart-grid { stroke: var(--hub-line); stroke-width: 1; }
.hub-chart-axis { font-size: 12px; fill: var(--hub-muted); font-family: var(--font-body); }
.hub-chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hub-chart-dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.hub-chart-cross { stroke: var(--hub-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.hub-chart-label { font-size: 13px; font-weight: 700; fill: var(--ink); font-family: var(--font-body); }
.hub-comps { display: flex; flex-direction: column; }
.hub-comp { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hub-line); text-decoration: none; font-size: 15px; }
.hub-comp span span { display: block; }
.hub-add-box { border-style: dashed; border-width: 2px; }

/* forms */
.hub-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.hub-field { flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hub-field-wide { flex-basis: 100%; }
.hub-field-sm { flex: 0 1 120px; }
.hub-form-actions { flex: 0 0 auto; }
.hub-label { font-size: 14px; font-weight: 600; }
.hub-input { min-height: 46px; width: 100%; border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 10px; padding: 0 12px;
    font: inherit; color: var(--ink); background: var(--card); }
select.hub-input { width: auto; max-width: 100%; }
.hub-field select.hub-input { width: 100%; }
.hub-switch { width: 52px; height: 30px; flex: none; border: 0; border-radius: 999px; padding: 3px; cursor: pointer; display: flex;
    background: color-mix(in srgb, var(--ink) 45%, var(--card)); transition: background .15s ease; }
.hub-switch span { width: 24px; height: 24px; border-radius: 50%; background: #fff; display: block; transition: transform .15s ease; }
.hub-switch[aria-checked="true"] { background: var(--accent); }
.hub-switch[aria-checked="true"] span { transform: translateX(22px); }
.hub-switch:disabled { opacity: .6; cursor: default; }
.hub-alert-row { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hub-line); }
.hub-days { flex-wrap: wrap; gap: 6px; }
.hub-day-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); background: var(--card);
    color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.hub-day-btn[aria-pressed="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.hub-pref { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.hub-pref-line { border-top: 1px solid var(--hub-line); padding-top: 14px; }

/* messages */
.hub-thread { display: flex; flex-direction: column; gap: 16px; }
.hub-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--hub-muted); padding-bottom: 14px; border-bottom: 1px solid var(--hub-line); }
.hub-legend span { display: flex; align-items: center; gap: 6px; }
.hub-day { display: flex; flex-direction: column; gap: 12px; }
.hub-day-label { align-self: center; background: var(--hub-soft); color: var(--hub-muted); font-size: 13px; font-weight: 600; border-radius: 999px; padding: 4px 14px; }
.hub-msg { max-width: 78%; display: flex; flex-direction: column; gap: 4px; }
.hub-msg-them { align-self: flex-start; align-items: flex-start; }
.hub-msg-me { align-self: flex-end; align-items: flex-end; }
.hub-bubble { padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--hub-soft); }
.hub-msg-me .hub-bubble { border-radius: 14px 14px 4px 14px; background: var(--accent); color: #fff; }
.hub-bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.hub-about { display: block; margin-bottom: 8px; padding: 6px 10px; border-radius: 8px; background: var(--card); color: var(--ink) !important;
    font-size: 13px; font-weight: 600; text-decoration: none; }
.hub-about-box { border: 1px solid var(--hub-line); margin: 0; }
.hub-msg-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--hub-muted); }
.hub-composer { display: flex; flex-direction: column; gap: 8px; }
.hub-two-main .hub-composer { border-top: 1px solid var(--hub-line); padding-top: 16px; }
.hub-composer p { margin: 0; }
.hub-composer-row { display: flex; gap: 10px; align-items: flex-end; }
.hub-composer textarea { flex: 1; min-width: 0; min-height: 46px; border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 10px;
    padding: 11px 14px; font: inherit; color: var(--ink); background: var(--card); resize: vertical; }

/* sign-in prompt, confirm dialog, toast */
.hub-signin { max-width: 640px; margin: 40px auto; display: flex; flex-direction: column; gap: 16px; }
.hub-signin .hub-lead { margin: 0; }
.hub-modal { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.hub-modal-box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 12px; }
.hub-modal-box p { margin: 0; }
.hub-toastlet { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 121; background: var(--ink); color: var(--card);
    padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 600; max-width: calc(100vw - 32px); }

/* phone tab bar: the hub's own pages only */
.al-hub-tabs { display: none; }
@media (max-width: 900px) {
    .al-hub-wrap { padding: 24px 16px 104px; }
    .hub-stack { gap: 32px; }
    .al-hub h1.display { font-size: 32px; }
    .al-hub h2.display { font-size: 24px; }
    .hub-lead { font-size: 16px; }
    .hub-figure-lg { font-size: 36px; }
    .hub-msg { max-width: 90%; }
    .hub-stat { flex-basis: 30%; padding: 12px; }
    .hub-stat-n { font-size: 26px; }
    .hub-stat .hub-muted { font-size: 13px; }
    .al-hub-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 88;
        background: var(--card); color: var(--ink); border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
        padding: 4px 4px calc(6px + env(safe-area-inset-bottom)); font-family: var(--font-body); }
    .al-hub-tabs a { position: relative; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        color: color-mix(in srgb, var(--ink) 68%, var(--card)); text-decoration: none; font-size: 11px; font-weight: 600; border-top: 3px solid transparent; }
    .al-hub-tabs a.hub-current { color: var(--ink); font-weight: 700; border-top-color: var(--accent); }
    .al-hub-tabs svg { width: 22px; height: 22px; }
    .al-hub-tabs .hub-badge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; font-style: normal; }
    /* keep the site footer clear of the fixed bar */
    body.al-standalone { padding-bottom: 64px; }
}
