/* Frank — Homeowner in-life app, from Figma "Homeowners" pages 05–07.
   Mobile (393) below 960px, Desktop (1280) from 960px. Tokens from ../../css/base.css.
   All classes are prefixed hf- so home-more.css can sit next to them. */

body.hf { background: var(--background); color: var(--foreground); min-height: 100dvh; }
.hf *:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
:where(.hf) :where(button) { font: inherit; color: inherit; } /* zero specificity, so class font sizes win */

/* ---------- Type (Figma text styles) ---------- */
.hf-h1 { font-weight: 400; font-size: 28px; line-height: 32px; letter-spacing: -0.5px; }        /* Title/L */
.hf-h3 { font-weight: 400; font-size: 18px; line-height: 24px; letter-spacing: -0.18px; }       /* Title/S */
.hf-body { font-size: 14px; line-height: 20px; }                                                 /* Body/M */
.hf-strong { font-size: 14px; line-height: 20px; font-weight: 500; }                             /* Body/M Strong */
.hf-small { font-size: 12px; line-height: 16px; }                                                /* Body/S */
.hf-label { font-size: 12px; line-height: 16px; font-weight: 500; }                              /* Label/S */
.hf-big { font-size: 40px; line-height: 44px; letter-spacing: -1px; font-weight: 300; }
.hf-muted { color: var(--muted-foreground); }
.hf-att { color: var(--attention); }
.hf-ok { color: var(--success); }
.hf-primary { color: var(--primary); }
.hf-center { text-align: center; }
.hf-mt { margin-top: 16px; }
.hf-strong, .hf-small, .hf-body, .hf-label { display: block; }
span.hf-strong, span.hf-small, span.hf-body, span.hf-label { display: block; }

/* ---------- Icons, avatars, pills ---------- */
.hf-ic { display: inline-block; flex-shrink: 0; background-color: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.hf-av { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; overflow: hidden; background: var(--muted); }
.hf-av img { width: 100%; height: 100%; object-fit: cover; }
.hf-av--init { color: var(--muted-foreground); font-weight: 500; }
.hf-pill { flex-shrink: 0; display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; background: var(--muted); color: var(--foreground); }
.hf-pill--attention { background: var(--attention-subtle); color: var(--attention); }
.hf-pill--success { background: var(--success-subtle); color: var(--success); }
.hf-pill--info { background: var(--info-subtle); color: var(--info); }   /* scheduled: Gulf on Sky (07 §5) */
.hf-pill--dark { background: var(--foreground); color: var(--paper); }

/* ---------- Links and buttons ---------- */
.hf-link { font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; cursor: pointer; }
.hf-link--s { font-size: 12px; line-height: 16px; }
.hf-link--muted { color: var(--muted-foreground); font-weight: 400; }
.hf-link-strong { font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; position: relative; z-index: 2; }
.hf-inline-link { color: inherit; font-size: inherit; line-height: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .hf-inline-link:hover, .hf-link-strong:hover { text-decoration: underline; } }
.hf-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 48px; padding: 0 24px; border-radius: 999px; font-size: 14px; line-height: 20px; font-weight: 500; text-align: center; transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui); }
.hf-btn:active:not(:disabled) { transform: scale(.98); }
.hf-btn--primary { background: var(--primary); color: var(--paper); }
@media (hover: hover) and (pointer: fine) { .hf-btn--primary:hover:not(:disabled) { background: var(--primary-hover); } }
.hf-btn--primary:disabled { background: color-mix(in srgb, var(--primary) 35%, #fff); cursor: not-allowed; }
.hf-btn--outline { border: 1px solid var(--foreground); background: var(--card); }
.hf-btn--tertiary { background: none; }
.hf-btn--danger { background: var(--attention); color: var(--paper); }
.hf-btn--sm { width: auto; height: 36px; padding: 0 16px; }

/* ---------- Shell ---------- */
.hf-topnav { display: none; }
.hf-mhead { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px 8px; }
.hf-mhead[hidden] { display: none; }
.hf-mhead--logo { padding-bottom: 8px; }                     /* 13a: 48 tall, logo only */
.hf .hm-account-m > .hm-logo { display: none; }              /* the shell draws the Account header (13a), not the page */
.hf-logo { font-size: 26px; line-height: 32px; color: var(--brand); }   /* 07 §6a: app headers 26px; tracking -4% from the logo rule in base.css */
.hf-switch { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; line-height: 16px; white-space: nowrap; background: var(--card); }
@media (hover: hover) and (pointer: fine) { .hf-switch:hover { background: var(--muted); } }
.hf-main { display: block; padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.hf-main:focus { outline: none; }
.hf-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-between; padding: 8px 32px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--background); border-top: 1px solid var(--border-subtle); }
.hf-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 56px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.hf-tab.is-on { color: var(--foreground); font-weight: 500; }
.hf-dot { position: absolute; top: 0; right: 14px; width: 8px; height: 8px; border-radius: 999px; background: var(--attention); }
/* Unread count on the Messages tab (19 Nov 2026: a number, as the iOS tab badge shows) */
.hf-count { position: absolute; top: -4px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); /* one colour for unread, 10e·U */ font-size: 11px; line-height: 18px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.hf-ownpro { text-decoration: none; color: inherit; margin-top: 12px; }
.hf-ownpro .hf-link { align-self: flex-start; }
body.hf-detail .hf-tabs { display: none; }
body.hf-detail .hf-main { padding-bottom: 0; }
/* Conversations keep the tabs (Figma 10b); the sticky message box sits on top of them */
@media (max-width: 959px) {
  body.hf-detail.hf-thread .hf-tabs { display: flex; }
  body.hf-detail.hf-thread .hf-main { padding-bottom: 69px; }
  body.hf-thread .hm-composer { bottom: 69px; }
}
.hf-offline { position: fixed; left: 24px; right: 24px; bottom: calc(82px + env(safe-area-inset-bottom, 0px)); z-index: 45; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--foreground); color: var(--paper); font-size: 14px; line-height: 20px; cursor: pointer; }
.hf-offline[hidden] { display: none; }

/* ---------- Page scaffolding ---------- */
.hf-page { display: flex; flex-direction: column; gap: 24px; padding: 16px 24px 40px; }
.hf-sec { display: flex; flex-direction: column; gap: 12px; }
.hf-sec--tight { gap: 4px; }
.hf-sec--tight > .hf-h3 { margin-bottom: 8px; }
.hf-sec--flush { gap: 0; }
.hf-sec__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hf-div { width: 100%; height: 1px; border: 0; margin: 0; background: var(--border-subtle); }
.hf-title { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hf-back { display: flex; }
.hf-back__m { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border-subtle); border-radius: 999px; }
.hf-back__d { display: none; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
.hf-only-d { display: none; }
@media (max-width: 959.98px) {
  .hf-only-d { display: none !important; }
  .hf-visit > .hf-back, .hf-plan-page > .hf-back, .hf-cancel > .hf-back { margin-bottom: -4px; } /* Figma: 24 under the back button, 28 between sections */
}
span.hf-only-m.hf-inl, span.hf-only-d.hf-inl { display: inline; }
.hf-list { display: flex; flex-direction: column; }
.is-off { opacity: .45; }

/* List row (Figma 11:231) */
.hf-row { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); text-align: left; }
.hf-row__ic { display: inline-flex; flex-shrink: 0; }
.hf-row__copy { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hf-row__t { font-size: 14px; line-height: 20px; }
.hf-row__s { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
@media (hover: hover) and (pointer: fine) { .hf-row:hover:not(:disabled):not(.is-disabled) .hf-row__t { text-decoration: underline; text-underline-offset: 3px; } }
.hf-row:disabled, .hf-row.is-disabled { cursor: default; }
.hf-row:disabled .hf-row__t { color: var(--foreground); }

/* ---------- Home (05a) ---------- */
.hf-greet { display: flex; flex-direction: column; gap: 24px; }
.hf-greet__copy { display: flex; flex-direction: column; gap: 24px; }
.hf-access { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; }
.hf-access .hf-small { flex: 1; }
.hf-cols, .hf-colmain { display: flex; flex-direction: column; gap: 24px; }
.hf-vgrid { display: flex; flex-direction: column; gap: 12px; }
/* Visit card (Figma 11:404) */
.hf-vc { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 16px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--card); transition: border-color var(--dur-ui); }
@media (hover: hover) and (pointer: fine) { .hf-vc:hover { border-color: var(--border); } }
.hf-vc__hit { position: absolute; inset: 0; border-radius: 12px; z-index: 1; }
.hf-vc__when { display: flex; align-items: center; gap: 8px; }
.hf-vc__wb { flex: 1; min-width: 0; }
.hf-vc__svc { display: flex; align-items: center; gap: 12px; }
.hf-vc__sc { flex: 1; min-width: 0; }
.hf-vc__foot { display: flex; align-items: center; gap: 16px; }
.hf-prov { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.hf-prov__copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hf-prov__n { font-size: 14px; line-height: 20px; font-weight: 500; }
.hf-prov__s { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.hf-prov__s .hf-ic { color: var(--foreground); }
.hf-prov__co { white-space: nowrap; } /* X-16: "Bayou Pest Co." never breaks mid-name */
/* Exception note: attention (storms, missed, on hold), success (on the way), muted (new pro, holiday) */
.hf-exc { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 8px; background: var(--attention-subtle); }
.hf-exc .hf-ic { color: var(--attention); }
.hf-exc p { flex: 1; font-size: 12px; line-height: 16px; }
.hf-exc--success { background: var(--success-subtle); }
.hf-exc--success .hf-ic { color: var(--success); }
.hf-exc--muted { background: var(--muted); }
.hf-exc--muted .hf-ic { color: var(--foreground); }
/* Done recently */
.hf-donelist { display: flex; flex-direction: column; gap: 12px; }
.hf-done { display: flex; align-items: center; gap: 12px; }
.hf-done__ph { flex-shrink: 0; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--muted); }
.hf-done__ph img { width: 100%; height: 100%; object-fit: cover; }
.hf-done__copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hf-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px; border: 1px dashed var(--border-subtle); border-radius: 12px; text-align: center; }
.hf-empty--left { align-items: flex-start; text-align: left; padding: 20px; }
/* Plan card + rail cards */
.hf-plan { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 12px; background: var(--muted); }
.hf-plan .hf-link { margin-top: 4px; }
.hf-plan__row { display: flex; justify-content: space-between; gap: 12px; width: 100%; font-size: 14px; line-height: 20px; font-weight: 500; }
.hf-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border: 1px solid var(--border-subtle); border-radius: 12px; }
.hf-help { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 12px; background: var(--muted); width: 100%; }
.hf-restart { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--border-subtle); border-radius: 12px; }
/* Banner (Figma 11:375) */
.hf-banner { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 12px; background: var(--muted); }
.hf-banner > .hf-ic { margin-top: 1px; }
.hf-banner--attention { background: var(--attention-subtle); }
.hf-banner--attention > .hf-ic { color: var(--attention); }
.hf-banner__copy { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.hf-banner__act { font-size: 14px; line-height: 20px; font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .hf-banner__act:hover { text-decoration: underline; } }

/* ---------- Schedule (05b) ---------- */
/* Schedule (05b, redesigned 16 Nov) */
.hf-sched { gap: 24px; }
.hf-sched__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hf-sched__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hf-sched__grid { display: flex; flex-direction: column; gap: 32px; }
.hf-sched__main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hf-range { display: flex; gap: 24px; }
.hf-range__t { display: flex; flex-direction: column; gap: 6px; min-height: 44px; justify-content: center; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
.hf-range__t::after { content: ""; width: 24px; height: 2px; }
.hf-range__t.is-on { color: var(--foreground); font-weight: 500; }
.hf-range__t.is-on::after { background: var(--foreground); }
.hf-cal { display: flex; flex-direction: column; gap: 4px; padding: 12px 8px; border: 1px solid var(--border-subtle); border-radius: 12px; }
.hf-cal__wk, .hf-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.hf-cal__wk span { text-align: center; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.hf-cal__grid { row-gap: 4px; }
.hf-cal__d { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 8px; font-size: 14px; line-height: 20px; }
.hf-cal__d i { display: block; width: 6px; height: 6px; border-radius: 50%; }
.hf-cal__d.is-past { color: var(--muted-foreground); }
.hf-cal__d.is-today { background: var(--muted); color: var(--foreground); }
@media (hover: hover) and (pointer: fine) { a.hf-cal__d:hover { background: var(--muted); } }
.hf-dot-done { background: var(--success); }
.hf-dot-booked { background: var(--info); }   /* scheduled = Gulf (07 §5) */
.hf-dot-att { background: var(--attention); }
.hf-dot-off { background: var(--border); }
.hf-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.hf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hf-legend i { display: block; width: 8px; height: 8px; border-radius: 50%; }
.hf-pestnote { display: flex; align-items: center; gap: 6px; }
.hf-slist { display: flex; flex-direction: column; }
.hf-srow { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.hf-srow__d { width: 56px; flex-shrink: 0; font-size: 14px; line-height: 20px; font-weight: 500; }
.hf-srow__c { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hf-srow.is-past .hf-srow__d, .hf-srow.is-past .hf-strong { color: var(--muted-foreground); }
@media (hover: hover) and (pointer: fine) { .hf-srow:hover .hf-strong { text-decoration: underline; text-underline-offset: 3px; } }
.hf-srow .hf-pill { flex-shrink: 0; }
/* Desktop month grid */
.hf-mcal { border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden; background: var(--card); }
.hf-mcal__wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--muted); }
.hf-mcal__wk span { padding: 10px 12px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted-foreground); }
.hf-mcal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.hf-mcal__d { min-height: 112px; display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; border-top: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); min-width: 0; }
.hf-mcal__d:nth-child(7n) { border-right: 0; }
.hf-mcal__n { font-size: 12px; line-height: 16px; }
.hf-mcal__d.is-past .hf-mcal__n { color: var(--muted-foreground); }
.hf-mcal__d.is-out .hf-mcal__n { color: var(--muted-foreground); opacity: .5; }
.hf-mcal__today { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 500; }
.hf-mcal__today b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--foreground); color: var(--paper); font-weight: 500; }
.hf-chip { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 8px; background: var(--muted); min-width: 0; transition: transform var(--dur-press) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { a.hf-chip:hover { outline: 1px solid var(--foreground); } }
.hf-chip__t { display: flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-chip__s { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.hf-chip:where([class*="svc--"]) { background: var(--svc-w); }
.hf-chip--done { background: var(--success-subtle); }
.hf-chip--done .hf-chip__t { color: var(--success); }
.hf-chip--att { background: var(--attention-subtle); }
.hf-chip--att .hf-chip__t { color: var(--attention); }
.hf-chip--live { background: var(--success-subtle); }
.hf-chip--off { background: none; border: 1px dashed var(--border); }
.hf-chip--ghost { background: var(--attention-subtle); opacity: .55; }
.hf-chip--ghost .hf-chip__t { color: var(--attention); }
/* Rail */
.hf-rail__sec { display: flex; flex-direction: column; gap: 12px; }
.hf-accessline { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--muted); }
.hf-accessline > span { display: flex; flex-direction: column; gap: 2px; }
.hf-btnrow { display: flex; gap: 8px; }
.hf-btnrow .hf-btn { width: auto; }
.hf-pros { gap: 16px; padding: 20px; background: var(--muted); border: 0; align-items: stretch; }
.hf-pros__i { display: flex; flex-direction: column; gap: 8px; }
@media (hover: hover) and (pointer: fine) { .hf-pros .hf-prov:hover .hf-prov__n { text-decoration: underline; text-underline-offset: 3px; } }

/* ---------- Visit detail (05c, 05c·E) ---------- */
.hf-visit { gap: 28px; }
.hf-visit__grid, .hf-visit__main, .hf-visit__rail { display: flex; flex-direction: column; gap: 28px; }
.hf-provcard { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--border-subtle); border-radius: 12px; }
.hf-getin { gap: 4px; }
.hf-getin .hf-list { gap: 4px; }
.hf-svcrow { display: flex; flex-direction: column; gap: 12px; }
.hf-svcrow__sum { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.hf-badge-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: var(--muted); flex-shrink: 0; }
.hf-badge-ic[class*="svc--"], .hf-prow__ic[class*="svc--"] { background: var(--svc-w); color: var(--svc-i); }
.hf-prow__ic[class*="svc--"] { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; }
.hf-vc__svc .svc-tile { --sz: 40px; }
.hf-scope { display: flex; flex-direction: column; gap: 8px; padding-left: 52px; }
.hf-scope__r { display: flex; align-items: flex-start; gap: 8px; }
.hf-scope__r > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.hf-photos img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; }
.hf-tl { display: flex; flex-direction: column; }
/* Figma 05c·E "Live timeline": 48 per step, dot level with the title, rail 12→46 */
.hf-tl__s { position: relative; display: flex; gap: 14px; min-height: 48px; }
.hf-tl__s::before { content: ""; position: absolute; left: 5px; top: 12px; height: 34px; width: 2px; background: var(--border-subtle); }
.hf-tl__s:last-child::before { display: none; }
.hf-tl__dot { position: relative; z-index: 1; flex-shrink: 0; width: 12px; height: 12px; border-radius: 999px; background: var(--border); }
.hf-tl__c { display: flex; flex-direction: column; gap: 0; }
.hf-tl__s.is-done .hf-tl__dot { background: var(--success); }
.hf-tl__s.is-now .hf-tl__dot { background: var(--primary); }
.hf-tl__s.is-next .hf-body { color: var(--muted-foreground); }

/* ---------- Sheets (Figma Sheet header 11:554) ---------- */
.hf-sheet-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.hf-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity var(--dur-state) var(--ease-out); }
.hf-sheet { position: relative; width: 100%; max-height: 92dvh; overflow: auto; display: flex; flex-direction: column; background: var(--card); border-radius: 16px 16px 0 0; transform: translateY(100%); transition: transform var(--dur-state) var(--ease-out); }
.hf-sheet-wrap.is-open .hf-scrim { opacity: 1; }
.hf-sheet-wrap.is-open .hf-sheet { transform: none; }
html.hf-has-sheet body { overflow: hidden; }
.hf-sheet__head { position: sticky; top: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 16px; border-bottom: 1px solid var(--border-subtle); background: var(--card); }
.hf-grab { width: 36px; height: 4px; border-radius: 2px; background: var(--border); }
.hf-sheet__bar { display: flex; align-items: center; width: 100%; padding: 0 24px; }
.hf-sheet__x { display: inline-flex; width: 20px; height: 20px; }
.hf-sheet__title { flex: 1; text-align: center; font-size: 14px; line-height: 20px; font-weight: 500; }
.hf-sheet__bal { width: 20px; }
.hf-sheet__body { display: flex; flex-direction: column; gap: 20px; padding: 20px 24px 8px; }
.hf-sheet__foot { display: flex; flex-direction: column; gap: 12px; padding: 16px 24px calc(32px + env(safe-area-inset-bottom, 0px)); }
.hf-days { display: flex; gap: 8px; }
.hf-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 0; border: 1px solid var(--border); border-radius: 12px; }
.hf-day__n { font-size: 22px; line-height: 28px; letter-spacing: -0.3px; }
.hf-day.is-on { border: 2px solid var(--foreground); background: var(--muted); padding: 11px 0; }
.hf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* Filter chips: scoped to .hf-chips so they don't restyle the calendar's visit chips (.hf-chip in .hf-mcal) */
.hf-chips > .hf-chip { padding: 4px 8px; border-radius: 999px; background: var(--muted); font-size: 12px; line-height: 16px; font-weight: 500; }
.hf-chips > .hf-chip.is-on { background: var(--foreground); color: var(--paper); }
/* Narrow day cells: wrap the visit label rather than cut it */
.hf-mcal__d { container-type: inline-size; }
.hf-mcal .hf-chip__t { white-space: normal; overflow-wrap: normal; word-break: normal; align-items: flex-start; }
@container (max-width: 96px) { .hf-mcal .hf-chip__t .hf-ic { display: none; } .hf-mcal .hf-chip { padding: 5px 6px; } }
.hf-sum { display: flex; flex-direction: column; gap: 20px; }
.hf-sum__r { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 20px; }
.hf-sum__tot { padding-top: 12px; border-top: 1px solid var(--border-subtle); font-weight: 500; }
.hf-sum--lines { gap: 4px; }
.hf-sum--compact { gap: 8px; }                                  /* 06a·E Cancel: rows 8 apart, total 12 under its rule */
.hf-sec--happen { gap: 8px; }
.hf-sec--reason { gap: 10px; }
.hf-sec--reason > h2 { font-weight: 400; }
.hf-plan--alt { padding: 16px; }
.hf-plan--alt .hf-link { margin-top: 0; }
.hf-stack20 { display: flex; flex-direction: column; gap: 20px; }
.hf-cancel { gap: 28px; }
.hf-sum--lines .hf-sum__r { padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.hf-yr { display: flex; align-items: baseline; gap: 8px; }
.hf-yr .hf-big { font-size: 32px; line-height: 36px; letter-spacing: -0.5px; }
/* Figma 07c: everything 16 apart, footer 20 on top */
.hf-sheet--yearly .hf-sheet__body, .hf-sheet--yearly .hf-sum { gap: 16px; }
.hf-sheet--yearly .hf-sheet__body { padding-bottom: 0; }
.hf-sheet--yearly .hf-sheet__foot { padding-top: 20px; }
.hf-radios { display: flex; flex-direction: column; gap: 8px; }
.hf-radio { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.hf-radio input { margin-top: 3px; accent-color: var(--foreground); }
.hf-radio:has(input:checked) { border-color: var(--foreground); }
.hf-stars { display: flex; gap: 8px; }
.hf-star { color: var(--border); }
.hf-star.is-on { color: var(--foreground); }
.hf-field { display: flex; flex-direction: column; gap: 6px; }
.hf-field[hidden] { display: none; }
.hf-field textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 12px; font: inherit; font-size: 16px; resize: vertical; }
.hf-note { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }

/* ---------- Plan (06a, 06b, 06a·E) ---------- */
.hf-plan-page { gap: 28px; }
.hf-plan__grid, .hf-plan__main { display: flex; flex-direction: column; gap: 28px; }
.hf-prow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); text-align: left; }
.hf-prow__ic { display: inline-flex; flex-shrink: 0; }
.hf-prow__acts { display: flex; gap: 12px; flex-shrink: 0; }
.hf-prow.is-off { opacity: 1; }
.hf-prow.is-off .hf-prow__ic, .hf-prow.is-off .hf-row__copy { opacity: .45; }
.hf-plus { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 999px; flex-shrink: 0; }
@media (hover: hover) and (pointer: fine) { .hf-prow--add:hover .hf-plus { background: var(--muted); } }
.hf-sticky { position: sticky; bottom: 0; z-index: 5; display: flex; flex-direction: column; gap: 8px; margin: 0 -24px -40px; padding: 16px 24px calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--background); border-top: 1px solid var(--border-subtle); }
.hf-pricebox { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--card); } /* Figma 06a "New price" */
.hf-pricebox .hf-big { font-size: 32px; line-height: 36px; letter-spacing: -0.5px; }

/* ---------- Payments (07a–07d, 07a·E) ---------- */
.hf-acct, .hf-acct__main { display: flex; flex-direction: column; gap: 24px; }
.hf-acct { padding: 0; }
.hf-acct__main { padding: 16px 24px 40px; gap: 28px; }
.hf-acct__main > .hf-only-m:first-child { margin-bottom: -4px; }     /* 24 under the back button */
/* Payments rows (Figma 07a): section head 28, items 4 apart, rows 67 */
.hf-sec--pay { gap: 4px; }
.hf-sec--pay > .hf-h3, .hf-sec--pay > .hf-sec__head { min-height: 28px; align-items: flex-start; }
.hf-sec--pay .hf-list { gap: 4px; }
.hf-next { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 12px; background: var(--muted); }
.hf-next .hf-big { font-size: 32px; line-height: 36px; letter-spacing: -0.5px; }
.hf-next__n { display: flex; align-items: baseline; gap: 8px; }
.hf-how { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.hf-promo { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 12px; background: var(--success-subtle); text-align: left; }
.hf-meth, .hf-credit { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.hf-methlist { display: flex; flex-direction: column; gap: 16px; }
.hf-methcard .hf-pill { padding: 3px 10px; }
/* 07d: 16 apart on phones (20 under the back button), 20 on desktop */
.hf-acct__main.hf-methods { gap: 16px; }
.hf-acct__main.hf-methods > .hf-only-m:first-child { margin-bottom: 4px; }
.hf-methods .hf-list .hf-row { padding: 16px 0; }
.hf-methcard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border: 1px solid var(--border); border-radius: 12px; text-align: left; }
@media (hover: hover) and (pointer: fine) { .hf-methcard:hover { border-color: var(--foreground); } }
.hf-stmt { display: flex; flex-direction: column; gap: 4px; }
.hf-stmt__home { display: flex; flex-direction: column; gap: 4px; }
.hf-stmt__home .hf-sec__head { min-height: 28px; align-items: flex-start; }
.hf-li { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.hf-stmt > .hf-sum__tot { border-top: 0; padding-top: 16px; }

/* =========================================================
   Desktop (Figma 1280): top nav, 1120 content
   ========================================================= */
@media (min-width: 960px) {
  .hf-only-m { display: none !important; }
  .hf-only-d { display: block; }
  span.hf-only-d.hf-inl { display: inline; }
  .hf-topnav { position: sticky; top: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; padding: 20px max(40px, calc((100vw - 1120px) / 2)); background: var(--background); border-bottom: 1px solid var(--border-subtle); }
  .hf-topnav .hf-logo { font-size: 26px; line-height: 32px; justify-self: start; }
  .hf-topnav__tabs { display: flex; gap: 32px; }
  .hf-toptab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
  .hf-toptab::after { content: ""; width: 24px; height: 2px; }
  .hf-toptab.is-on { color: var(--foreground); font-weight: 500; }
  .hf-toptab.is-on::after { background: var(--foreground); }
  @media (hover: hover) and (pointer: fine) { .hf-toptab:hover { color: var(--foreground); } }
  .hf-toptab .hf-dot { right: -10px; }
  .hf-toptab .hf-count { top: -10px; right: -18px; }
  .hf-ask { justify-self: end; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; line-height: 20px; font-weight: 500; }
  @media (hover: hover) and (pointer: fine) { .hf-ask:hover { background: var(--muted); } }
  .hf-mhead, .hf-mhead[hidden], .hf-tabs { display: none !important; }
  .hf-main { padding-bottom: 0; }
  .hf-offline { left: 50%; right: auto; bottom: 24px; transform: translateX(-50%); width: min(480px, calc(100vw - 32px)); }

  .hf-page { width: min(1120px, calc(100vw - 80px)); margin: 0 auto; padding: 48px 0 96px; gap: 32px; }
  .hf-back__m { display: none; }
  .hf-back__d { display: inline-block; color: var(--foreground); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
  .hf-page:has(> .hf-back) { padding-top: 40px; }

  .hf-greet { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  /* The copy column is as wide as the greeting or its line, whichever is wider; the visit-day pill fills it (Figma 05a: 250) */
  .hf-greet__copy { gap: 6px; width: max-content; max-width: 720px; }
  .hf-greet__copy > .hf-access { width: 0; min-width: 100%; box-sizing: border-box; }
  .hf-cols { flex-direction: row; align-items: flex-start; gap: 64px; }
  .hf-colmain { flex: 1; min-width: 0; gap: 40px; }
  .hf-rail { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; gap: 24px; }
  .hf-vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .hf-sec--done { gap: 16px; }
  .hf-donelist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .hf-done { flex-direction: column; align-items: stretch; gap: 10px; }
  .hf-done__ph { width: 100%; height: 160px; border-radius: 12px; }
  .hf-done__ph .hf-only-d { display: block; }
  .hf-done__copy { gap: 10px; }
  .hf-help { text-align: left; }

  .hf-sched { padding-top: 40px; gap: 20px; }
  .hf-sched__head .hf-btn { width: auto; }
  .hf-sched__bar .hf-range { gap: 4px; padding: 4px; border-radius: 999px; background: var(--muted); }
  .hf-sched__bar .hf-range__t { min-height: 32px; padding: 0 14px; border-radius: 999px; }
  .hf-sched__bar .hf-range__t::after { display: none; }
  .hf-sched__bar .hf-range__t.is-on { background: var(--card); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
  .hf-sched__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
  .hf-sched__main { gap: 24px; }
  .hf-sched__main > .hf-h3 { margin-top: 8px; }
  .hf-sched__rail { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 32px; }
  .hf-visit__grid { display: grid; grid-template-columns: minmax(0, 660px) 380px; justify-content: space-between; gap: 80px; align-items: start; }
  .hf-visit__rail, .hf-visit__rail.hf-only-d { display: flex; gap: 24px; }
  .hf-plan__grid { display: grid; grid-template-columns: minmax(0, 660px) 380px; justify-content: space-between; gap: 80px; align-items: start; }
  .hf-plan__rail, .hf-plan__rail.hf-only-d { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 24px; }
  .hf-sticky { position: static; margin: 0; padding: 16px 0 0; }
  .hf-plan-page .hf-sticky.hf-only-m { display: none; }
  .hf-cancel { width: min(560px, calc(100vw - 80px)); }

  /* Figma 07a Desktop sidebar: 260 wide, 80 to the content, items 40 tall, 2 apart */
  .hf-acct { flex-direction: row; align-items: flex-start; gap: 80px; padding: 48px 0 96px; }
  .hf-acct__nav, .hf-acct__nav.hf-only-d { position: sticky; top: 127px; width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; }
  .hf-acct__nav > .hf-h3 { font-size: 22px; line-height: 28px; letter-spacing: -0.3px; }
  .hf-acct__nav nav, .hf-acct__foot { display: flex; flex-direction: column; gap: 2px; }
  .hf-acct__l { padding: 10px 12px; border-radius: 8px; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
  @media (hover: hover) and (pointer: fine) { .hf-acct__l:hover { background: var(--muted); color: var(--foreground); } }
  .hf-acct__l.is-on { background: var(--muted); color: var(--foreground); font-weight: 500; }
  .hf-acct__foot .hf-acct__l { align-self: flex-start; padding: 0; background: none; text-decoration: underline; text-underline-offset: 3px; }
  .hf-acct__foot .hf-acct__l:first-child { color: var(--foreground); }
  .hf-acct__main { flex: 1; min-width: 0; max-width: 780px; padding: 0; }
  .hf-acct__main.hf-methods { gap: 20px; }
  .hf-methods .hf-methlist { gap: 20px; }

  .hf-sheet-wrap { align-items: center; }
  .hf-sheet { width: 560px; border-radius: 16px; transform: translateY(16px); opacity: 0; transition: transform var(--dur-state) var(--ease-out), opacity var(--dur-ui); }
  .hf-sheet--wide { width: 640px; }
  .hf-sheet-wrap.is-open .hf-sheet { opacity: 1; }
  .hf-grab { display: none; }
  .hf-sheet__head { padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hf-sheet, .hf-scrim, .hf-vc, .hf-btn { transition: none !important; }
}

/* Add to your calendar (VIS-9, added 16 Nov) */
.hf-sched__acts { display: flex; gap: 8px; align-items: center; }
.hf-sched__acts .hf-btn { width: auto; gap: 8px; }
.hf-calsheet { display: flex; flex-direction: column; gap: 16px; }
.hf-calopt { text-decoration: none; color: inherit; }
.hf-callink { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--muted); }
.hf-callink .hf-row__copy { flex: 1; min-width: 0; }
.hf-callink__u { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hf-sheet .hf-callink .hf-btn, .hf-callink .hf-btn { width: auto; height: 36px; padding: 0 16px; flex: none; }
.hf-calsheet .hf-inline-link { text-decoration: underline; text-underline-offset: 3px; font-weight: 500; color: var(--foreground); }

/* ---------- Self-serve fixes (docs/11 B1–B8, 17 Nov 2026) ---------- */
.hf-banner__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 8px; }
.hf-banner__acts .hf-btn--sm { width: auto; }
.hf-banner__act--muted { color: var(--muted-foreground); font-weight: 400; }
/* Safety sheet: 911 first (CARE-9) */
.hf-911 { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; background: var(--attention-subtle); }
.hf-911 > .hf-ic, .hf-911 > svg { color: var(--attention); flex-shrink: 0; }
.hf-911 > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hf-911 .hf-btn { width: auto; flex-shrink: 0; }
.hf-select, .hf-input { width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--foreground); font: inherit; font-size: 16px; }
/* Damage photos (CARE-7; prototype adds a simulated photo) */
.hf-photoadd { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.hf-photoadd .hf-btn { width: auto; gap: 8px; }
/* Demo-only control (shown with ?demo=1), never product UI */
.hf-demo-link { align-self: flex-start; padding: 6px 10px; border: 1px dashed var(--border); border-radius: 8px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
@media (hover: hover) and (pointer: fine) { .hf-demo-link:hover { color: var(--foreground); } }

/* Visit detail: what the member flagged and what became of it (VIS-12, 17 Nov 2026) */
.hf-flagrow { align-items: flex-start; }
.hf-flagrow > .hf-ic { margin-top: 2px; }
.hf-flagrow > .hf-pill { margin-top: 2px; }

/* 05c·R a repair visit (04 §10c, VIS-14) */
.hf-fix { display: flex; gap: 16px; align-items: flex-start; padding: 12px 0; }
.hf-fix__photo { width: 120px; height: 100px; flex: none; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }

/* 14i Home with no Mr Frank plan (04 NET-11, NET-6, X-260, X-262; Figma Homeowners 258:1228). Tokens only (07). */
.hf-ownwait { display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border-subtle); }
.hf-ownwait > .hf-row { border-bottom: 0; padding-bottom: 0; }
.hf-ownwait > .hf-btn { align-self: stretch; }
.hf-askcard { color: inherit; text-decoration: none; }
.hf-askcard .hf-row__copy { flex: 1; min-width: 0; }
@media (min-width: 960px) { .hf-home--own { max-width: 720px; } .hf-ownwait > .hf-btn { align-self: flex-start; } }
.hf-askcard .hm-av-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
