/* A Profile's page (/@{slug}; templates/profile.html), its About and Members tabs, and a Profile in a list
   (_profile_card.html). On HubHive's tokens (hh.css): a wide cover, the avatar over its edge, a navy name, pill
   actions sized for a thumb, and under them what the Profile is for (a Hive's members and rules, a business's shelf). */

/* ------------------------------------------------------------------ banners (private, unclaimed) */
.hp-banner { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin: 0 0 16px; border-radius: 16px; background: var(--hh-lilac); color: var(--hh-navy); }
.hp-banner.is-unclaimed { background: var(--hh-peach); }
.hp-banner-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--hh-card); color: var(--hh-violet); flex: none; }
.hp-banner-icon svg { width: 19px; height: 19px; }
.hp-banner-text { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: 14px; line-height: 1.35; color: var(--hh-muted); }
.hp-banner-text strong { color: var(--hh-navy); font-size: 15px; }
.hp-banner .btn { flex: none; }

/* ------------------------------------------------------------------ the header */
.hp-cover { position: relative; height: clamp(150px, 21vw, 250px); border-radius: 24px; overflow: hidden; background: var(--hh-grad); }
.hp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-cover.is-empty::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 90% at 85% 0%, rgba(255, 255, 255, 0.28), transparent 60%), radial-gradient(50% 80% at 8% 100%, rgba(255, 255, 255, 0.16), transparent 60%); }
.hp-cover.is-empty { height: clamp(116px, 13vw, 164px); }
.hp.is-business .hp-cover.is-empty { background: linear-gradient(120deg, var(--hh-navy-fill), var(--hh-indigo)); }
.hp.is-person .hp-cover.is-empty { background: linear-gradient(120deg, var(--hh-lilac), var(--hh-peach) 55%, var(--hh-mint)); }

.hp-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 22px; align-items: start; padding: 0 clamp(8px, 2.4vw, 28px); }
.hp-avatar { width: 124px; height: 124px; margin-top: -54px; border-radius: 32px; border: 5px solid var(--hh-card); background: var(--hh-grad); color: #fff;
  display: grid; place-items: center; overflow: hidden; font-size: 48px; font-weight: 800; box-shadow: var(--shadow-md); position: relative; z-index: 1; }
.hp.is-person .hp-avatar { border-radius: 50%; }
.hp.is-business .hp-avatar { background: var(--hh-navy-fill); }
.hp-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-id { min-width: 0; padding-top: 16px; }
.hp-sub { grid-column: 2 / -1; min-width: 0; }
.hp-name { margin: 0; font-size: clamp(1.55rem, 2.6vw, 2rem); line-height: 1.1; letter-spacing: -0.035em; font-weight: 800; color: var(--hh-navy); overflow-wrap: anywhere; }
.hp-meta, .hp-counts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.hp-meta { gap: 8px 12px; margin-top: 10px; color: var(--hh-muted); font-size: 14.5px; }
.hp-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.hp-meta-item svg { width: 15px; height: 15px; color: var(--hh-faint); }
.hp-live { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--hh-soft); color: var(--hh-muted); }
.hp-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--icon-faint); }
.hp-live.is-open { background: var(--success-soft); color: var(--success-ink); }
.hp-live.is-open i { background: var(--success); }
.hp-live.is-busy { background: var(--warning-soft); color: var(--warning-ink); }
.hp-live.is-busy i { background: var(--warning); }
.hp-rating { color: var(--hh-muted); text-decoration: none; }
.hp-rating strong { color: var(--hh-navy); }
.hp-rating:hover { color: var(--hh-violet); }
.hp-tagline { margin: 12px 0 0; font-size: 16.5px; line-height: 1.5; color: var(--hh-ink); max-width: 62ch; }
.hp-counts { gap: 4px 6px; margin-top: 12px; margin-left: -10px; }
.hp-counts button { border: 0; background: none; font: inherit; font-size: 14.5px; color: var(--hh-muted); padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.hp-counts button:hover { background: var(--hh-soft); color: var(--hh-ink); }
.hp-counts strong { color: var(--hh-navy); font-weight: 700; }
.hp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.hp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--hh-mint); color: var(--success-ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.hp-badge svg { width: 14px; height: 14px; }
.hp-follows-you { margin: 8px 0 0; font-size: 13px; color: var(--hh-faint); }

.hp-actions { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 18px; position: relative; grid-column: 3; grid-row: 1; }
.hp-actions .btn { min-height: 42px; padding-left: 17px; padding-right: 17px; white-space: nowrap; }
.hp-actions .btn svg { width: 17px; height: 17px; }
.hp-actions .btn-icon { width: 42px; padding: 0; justify-content: center; }
.hp-actions .hp-main { min-width: 116px; justify-content: center; }
.hp-more { position: relative; }
.hp-as { position: absolute; right: 2px; top: 100%; margin: 4px 0 0; font-size: 12.5px; color: var(--hh-faint); white-space: nowrap; }
[data-hh-follow][data-on="1"]:hover, [data-hh-join][data-state="member"]:hover { border-color: var(--danger); color: var(--danger-ink); background: var(--danger-soft); }
[data-hh-join][data-state="member"], [data-hh-join][data-state="requested"] { background: var(--surface); color: var(--hh-navy); border: 1px solid var(--border); }

/* ------------------------------------------------------------------ up front: a Hive's people and rules, a business's shelf */
.hp-intro { margin: 22px clamp(0px, 1vw, 8px) 0; }
.hp-intro.is-hive { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 1.6fr); gap: 14px; }
.hp-intro-card { background: var(--hh-mint); border-radius: 18px; padding: 16px 18px; min-width: 0; }
.hp-intro-card.is-rules { background: var(--hh-lilac); }
.hp-intro .hh-eyebrow { color: var(--hh-violet); }
.hp-intro-card .hh-eyebrow { margin: 0 0 10px; font-size: 11.5px; }
.hp-stack { display: flex; align-items: center; padding-left: 8px; }
.hp-stack-item, .hp-stack-more { width: 40px; height: 40px; margin-left: -8px; border-radius: 50%; border: 3px solid var(--hh-mint); background: var(--hh-grad); color: #fff; display: grid; place-items: center;
  overflow: hidden; font-weight: 700; font-size: 15px; text-decoration: none; flex: none; transition: transform .15s; }
.hp-stack-item:hover { transform: translateY(-2px); z-index: 1; }
.hp-stack-item img { width: 100%; height: 100%; object-fit: cover; }
.hp-stack-more { background: var(--hh-card); color: var(--hh-navy); font-size: 12.5px; }
.hp-intro-facts { margin: 10px 0 0; font-size: 13.5px; color: var(--hh-muted); }
.hp-rules { margin: 0; white-space: pre-line; font-size: 15px; line-height: 1.55; color: var(--hh-ink); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hp-shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.hp-shelf-head .hh-eyebrow { margin: 0; font-size: 11.5px; }
.hp-shelf-head a { font-size: 14px; font-weight: 600; color: var(--hh-violet); text-decoration: none; white-space: nowrap; }
.hp-shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(132px, 176px); justify-content: start; gap: 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding-bottom: 2px; }
.hp-shelf::-webkit-scrollbar { display: none; }
.hp-shelf-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; text-decoration: none; color: inherit; scroll-snap-align: start; }
.hp-shelf-pic { aspect-ratio: 16 / 10; border-radius: 14px; background: var(--hh-soft); overflow: hidden; display: grid; place-items: center; color: var(--icon-faint); }
.hp-shelf-pic.is-t0 { background: var(--hh-lilac); color: var(--hh-violet-bright); }
.hp-shelf-pic.is-t1 { background: var(--hh-peach); color: var(--warning); }
.hp-shelf-pic.is-t2 { background: var(--hh-mint); color: var(--success); }
.hp-shelf-pic svg { width: 26px; height: 26px; opacity: .7; }
.hp-shelf-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.hp-shelf-item:hover .hp-shelf-pic img { transform: scale(1.04); }
.hp-shelf-name { font-size: 13.5px; font-weight: 500; line-height: 1.3; color: var(--hh-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-shelf-price { font-size: 14px; font-weight: 700; color: var(--hh-navy); }
.hp-shelf-price s { font-weight: 400; font-size: 12px; color: var(--hh-faint); }

/* ------------------------------------------------------------------ tabs */
.hp-tabs { margin: 22px 0 20px; position: sticky; top: var(--topbar-h, 64px); z-index: 5; background: var(--hh-page); padding: 0 clamp(0px, 1vw, 8px); gap: 4px; scroll-snap-type: x proximity; }
.hp-tabs a { padding: 13px 14px; scroll-snap-align: center; }
.app.public-page .hp-tabs { top: 66px; }
.hp-body { min-height: 180px; }

/* ------------------------------------------------------------------ dialogs (followers, report) */
.hp-dialog { border: 0; border-radius: 24px; padding: 0; width: min(460px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - 48px)); background: var(--hh-card); color: var(--hh-ink); box-shadow: var(--shadow-xl); }
.hp-dialog::backdrop { background: var(--scrim); }
.hp-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 8px 22px; position: sticky; top: 0; background: var(--hh-card); }
.hp-dialog-head h2 { margin: 0; font-size: 1.15rem; }
.hp-dialog form { padding: 0 22px 20px; }
.hp-dialog form .hp-dialog-head { padding: 16px 0 0; position: static; margin-right: -6px; }
.hp-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 18px 0 0; }
.hp-people-list { padding: 4px 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.hp-people-list .hh-empty { padding: 28px 12px; }

/* ------------------------------------------------------------------ a Profile in a list (_profile_card.html) */
.hp-person { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; text-decoration: none; color: inherit; min-width: 0; }
.hp-person:hover { background: var(--hh-soft); }
.hp-person-pic { width: 46px; height: 46px; border-radius: 50%; flex: none; background: var(--hh-grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; overflow: hidden; }
.hp-person-pic.is-business, .hp-person-pic.is-hive { border-radius: 14px; }
.hp-person-pic.is-business { background: var(--hh-navy-fill); }
.hp-person-pic img { width: 100%; height: 100%; object-fit: cover; }
.hp-person-text { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.hp-person-text strong { color: var(--hh-navy); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-person-text small { color: var(--hh-faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-person-line { color: var(--hh-muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.hh-card.hp-person { padding: 14px; border: 1px solid var(--hh-line); transition: box-shadow .18s, border-color .18s, transform .18s; align-items: flex-start; }
a.hh-card.hp-person:hover { background: var(--hh-card); border-color: var(--accent-border); box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* ------------------------------------------------------------------ the About tab */
.hp-about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.hp-about-main, .hp-about-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hp-about h2 { margin: 0 0 10px; font-size: 1.05rem; color: var(--hh-navy); }
.hp-about-text { margin: 0; white-space: pre-line; line-height: 1.65; font-size: 15.5px; }
.hp-about-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.hp-hours { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.hp-hours div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 10px; border-radius: 10px; font-size: 14.5px; }
.hp-hours dt { color: var(--hh-muted); }
.hp-hours dd { margin: 0; color: var(--hh-ink); font-variant-numeric: tabular-nums; text-align: right; }
.hp-hours .is-today { background: var(--hh-lilac); font-weight: 600; }
.hp-hours .is-today dt { color: var(--hh-violet-deep); }
.hp-hours .is-closed dd { color: var(--hh-faint); }
.hp-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hp-contact a, .hp-contact span.hp-contact-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--hh-ink); text-decoration: none; font-size: 14.5px; min-width: 0; }
.hp-contact a:hover { background: var(--hh-soft); color: var(--hh-violet-deep); }
.hp-contact svg { width: 17px; height: 17px; color: var(--hh-faint); flex: none; }
.hp-contact .hp-contact-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ the Members tab */
.hp-members-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.hp-members-head p { margin: 0; color: var(--hh-muted); }
.hp-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }

/* ------------------------------------------------------------------ not found */
.hp-missing { text-align: center; padding: clamp(40px, 10vw, 96px) 16px; }
.hp-missing-mark { width: 72px; height: 72px; border-radius: 24px; background: var(--hh-lilac); color: var(--hh-violet); display: inline-grid; place-items: center; margin-bottom: 18px; }
.hp-missing-mark svg { width: 30px; height: 30px; }
.hp-missing p { color: var(--hh-muted); margin: 0 auto 20px; max-width: 44ch; }
.hp-missing-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hp-missing-search { margin: 0 auto 18px; max-width: 520px; text-align: left; padding-left: 16px; }
.hp-missing-search > svg { width: 18px; height: 18px; color: var(--hh-faint); flex: none; }
.hp-missing-search .btn { min-height: 42px; }
.hp-missing-actions .btn { gap: 6px; min-height: 44px; }
.hp-missing-actions .btn svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ a phone */
@media (max-width: 1340px) and (min-width: 761px) {
  .hp-actions a.btn svg { display: none; }
  .hp-actions .btn { padding-left: 15px; padding-right: 15px; }
}
@media (max-width: 760px) {
  .hp-cover { border-radius: 18px; height: 132px; }
  .hp-cover.is-empty { height: 100px; }
  .hp-bar { grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; padding: 0 4px; }
  .hp-avatar { width: 92px; height: 92px; margin-top: -42px; border-radius: 26px; border-width: 4px; font-size: 36px; }
  .hp-id, .hp-sub { grid-column: 1 / -1; }
  .hp-id { padding-top: 12px; }
  .hp-actions { grid-column: 1 / -1; grid-row: auto; justify-content: stretch; padding-top: 16px; }
  .hp-actions .btn { min-height: 46px; padding-left: 12px; padding-right: 12px; flex: 1 1 0; justify-content: center; min-width: 0; white-space: nowrap; }
  .hp-actions .btn-icon, .hp-actions .hh-watch, .hp-actions .hp-more { flex: none; }
  .hp-actions .btn-icon { width: 46px; }
  .hp-actions .hp-main { min-width: 0; flex: 1.3 1 0; }
  .hp-actions a.btn svg { display: none; }
  .hp-as { right: auto; left: 2px; }
  .hp-intro.is-hive { grid-template-columns: 1fr; }
  .hp-shelf { grid-auto-columns: 132px; margin-right: -16px; padding-right: 16px; }
  .hp-tabs { margin: 18px -16px 16px; padding: 0 12px; top: var(--topbar-h, 56px); }
  .hp-about { grid-template-columns: 1fr; }
  .hp-banner { align-items: flex-start; flex-wrap: wrap; }
  .hp-banner .btn { margin-left: 52px; }
  .hp-dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 82vh; }
}
@media (max-width: 380px) {
  .hp-actions [data-hh-ask] { display: none; }
}

/* A Profile draft on the stage (profiles_draft.html): the head as visitors will see it, in one card. */
.pfd-page { border: 1px solid var(--hh-line); border-radius: 22px; overflow: hidden; background: var(--hh-card); }
.pfd-cover { display: block; width: 100%; height: 148px; object-fit: cover; background: var(--hh-grad); }
.pfd-body { display: flex; flex-direction: column; gap: 8px; padding: 0 20px 20px; }
.pfd-avatar { margin-top: -52px; width: 92px; height: 92px; font-size: 36px; }
.pfd-name { margin: 4px 0 0; font-size: clamp(1.4rem, 5vw, 1.8rem); line-height: 1.12; letter-spacing: -0.035em; font-weight: 800; color: var(--hh-navy); overflow-wrap: anywhere; }
.pfd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; color: var(--hh-muted); font-size: 14px; }
.pfd-meta > span:not(.hh-pill) { display: inline-flex; align-items: center; gap: 4px; }
.pfd-meta svg { width: 15px; height: 15px; }
.pfd-tagline { margin: 4px 0 0; font-size: 16px; line-height: 1.5; color: var(--hh-ink); }
.pfd-about { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--hh-muted); white-space: pre-line; }
.pfd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.pfd-pic { display: block; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.pfd-pic.is-wide { width: 100%; max-width: 280px; height: 88px; border-radius: 12px; }
