/* Hero Visuals subsystem — Property Inspect
 * Pure HTML+CSS primitive system for landing-page hero compositions.
 *
 * Architecture:
 *   .hv-frame          — fixed-aspect canvas (default 640x640) every hero lives in
 *   .hv-frame[data-theme=...] — applies one of 12 page tints (bg gradient + accent stroke)
 *   primitives:        — .hv-card, .hv-badge, .hv-row, .hv-check, .hv-tile, .hv-arrow,
 *                        .hv-report, .hv-map, .hv-cluster, .hv-tab, .hv-pill, .hv-bar
 *   compositions:      — .hv-hero[data-hero=...] picks one of 12 pre-built layouts
 *
 * All visuals work standalone; drop them in any .hv-frame and tint via data-theme.
 * Status colors (pass/action/scheduled) NEVER tint — they stay brand.
 */

/* =========================================================
 * 1) FRAME + THEME TINTS
 * ========================================================= */
.hv-frame {
  --hv-bg-1: #FAFBFD;
  --hv-bg-2: #F2F4F8;
  --hv-accent: #5E656D;          /* per-theme stroke / soft accent */
  --hv-accent-soft: rgba(94,101,109,0.10);
  --hv-grid: rgba(54,62,72,0.05);
  --hv-card: #FFFFFF;
  --hv-card-border: #E1E4EC;
  --hv-text: #363E48;
  --hv-text-muted: #5E656D;
  --hv-text-subtle: #878C92;
  --hv-shadow: 0 12px 32px rgba(54,62,72,0.10), 0 2px 6px rgba(54,62,72,0.05);
  --hv-shadow-sm: 0 2px 8px rgba(54,62,72,0.06);

  /* status — never themed */
  --hv-pass: #3FAE52;
  --hv-pass-soft: #E7F6EA;
  --hv-action: #E0A62B;
  --hv-action-soft: #FCF3DC;
  --hv-fail: #D14848;
  --hv-fail-soft: #FBE5E5;
  --hv-info: #5577B0;
  --hv-info-soft: #E7EDF7;
  --hv-brand: #61CE70;

  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 90% 0%, var(--hv-accent-soft) 0%, transparent 55%),
    radial-gradient(ellipse at 0% 100%, var(--hv-accent-soft) 0%, transparent 55%),
    linear-gradient(160deg, var(--hv-bg-1) 0%, var(--hv-bg-2) 100%);
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--hv-text);
  isolation: isolate;
  contain: layout paint;
}
.hv-frame::before {
  /* faint grid texture */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--hv-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hv-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* aspect variants */
.hv-frame[data-aspect="square"] { aspect-ratio: 1 / 1; }
.hv-frame[data-aspect="portrait"] { aspect-ratio: 4 / 5; }
.hv-frame[data-aspect="landscape"] { aspect-ratio: 16 / 10; }

/* density */
.hv-frame[data-density="compact"]  { font-size: 11px; }
.hv-frame[data-density="default"]  { font-size: 12px; }
.hv-frame[data-density="roomy"]    { font-size: 13px; }

/* motion toggle */
.hv-frame[data-motion="off"] *,
.hv-frame[data-motion="off"] *::before,
.hv-frame[data-motion="off"] *::after { animation: none !important; transition: none !important; }

/* callouts toggle */
.hv-frame[data-callouts="off"] .hv-callout { display: none; }

/* ---- 12 themes ---- */
.hv-frame[data-theme="residential"]  { --hv-bg-1: #FBF7F0; --hv-bg-2: #F0E8D9; --hv-accent: #B89968; --hv-accent-soft: rgba(184,153,104,0.14); }
.hv-frame[data-theme="commercial"]   { --hv-bg-1: #F4F7FB; --hv-bg-2: #DFE6EF; --hv-accent: #5577B0; --hv-accent-soft: rgba(85,119,176,0.14); }
.hv-frame[data-theme="housing"]      { --hv-bg-1: #F1F8F2; --hv-bg-2: #DFEEDF; --hv-accent: #3FAE52; --hv-accent-soft: rgba(63,174,82,0.14); }
.hv-frame[data-theme="hospitality"]  { --hv-bg-1: #FBF6EC; --hv-bg-2: #F0E2C5; --hv-accent: #C49A52; --hv-accent-soft: rgba(196,154,82,0.14); }
.hv-frame[data-theme="fm"]           { --hv-bg-1: #F4F6F9; --hv-bg-2: #E1E6ED; --hv-accent: #5E7185; --hv-accent-soft: rgba(94,113,133,0.14); }
.hv-frame[data-theme="pm"]           { --hv-bg-1: #F4F5F7; --hv-bg-2: #DFE2E8; --hv-accent: #404F5E; --hv-accent-soft: rgba(64,79,94,0.16); }
.hv-frame[data-theme="btr"]          { --hv-bg-1: #F2F6F2; --hv-bg-2: #DFE7DF; --hv-accent: #6E8C72; --hv-accent-soft: rgba(110,140,114,0.14); }
.hv-frame[data-theme="block"]        { --hv-bg-1: #F6F7F8; --hv-bg-2: #E4E6E9; --hv-accent: #6F757C; --hv-accent-soft: rgba(111,117,124,0.14); }
.hv-frame[data-theme="asset"]        { --hv-bg-1: #F1F4FA; --hv-bg-2: #D9E0EF; --hv-accent: #2F4D8C; --hv-accent-soft: rgba(47,77,140,0.14); }
.hv-frame[data-theme="survey"]       { --hv-bg-1: #FAFBFC; --hv-bg-2: #ECEEF2; --hv-accent: #6B7380; --hv-accent-soft: rgba(107,115,128,0.12); }
.hv-frame[data-theme="compliance"]   { --hv-bg-1: #F0F8F2; --hv-bg-2: #DDEDDF; --hv-accent: #2E8C42; --hv-accent-soft: rgba(46,140,66,0.14); }
.hv-frame[data-theme="specialist"]   { --hv-bg-1: #EFF1F4; --hv-bg-2: #D6DAE0; --hv-accent: #404953; --hv-accent-soft: rgba(64,73,83,0.18); }

/* =========================================================
 * 2) PRIMITIVES
 * ========================================================= */

/* generic positioning helpers — every composition uses absolute */
.hv-stage {
  position: absolute; inset: 0;
  z-index: 1;
}

/* ----- card ----- */
.hv-card {
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 14px;
  box-shadow: var(--hv-shadow-sm);
  padding: 14px 16px;
  position: absolute;
}
.hv-card.elev { box-shadow: var(--hv-shadow); }
.hv-card.tinted {
  border-color: var(--hv-accent);
  border-color: color-mix(in oklab, var(--hv-accent) 40%, var(--hv-card-border));
}
.hv-card-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hv-text-subtle);
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hv-card-border);
}
.hv-card-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--hv-text);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.hv-card-meta {
  font-size: 11px;
  color: var(--hv-text-subtle);
}

/* ----- row (used in property lists / inspection lists) ----- */
.hv-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  font-size: 12px;
  color: var(--hv-text);
}
.hv-row + .hv-row { border-top: 1px solid var(--hv-card-border); }
.hv-row .label { flex: 1; min-width: 0; }
.hv-row .label strong {
  display: block; font-weight: 600;
  font-size: 12.5px; color: var(--hv-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hv-row .label span {
  display: block; font-size: 10.5px;
  color: var(--hv-text-subtle);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ----- badge (status) ----- */
.hv-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.hv-badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.hv-badge.pass      { background: var(--hv-pass-soft);   color: #1E7A2B; }
.hv-badge.action    { background: var(--hv-action-soft); color: #8a6515; }
.hv-badge.fail      { background: var(--hv-fail-soft);   color: #9b2828; }
.hv-badge.info      { background: var(--hv-info-soft);   color: #324A7A; }
.hv-badge.scheduled { background: var(--hv-info-soft);   color: #324A7A; }
.hv-badge.complete  { background: var(--hv-pass-soft);   color: #1E7A2B; }
.hv-badge.tinted    { background: var(--hv-accent-soft); color: var(--hv-accent); }

/* ----- pill / kicker ----- */
.hv-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hv-text-muted);
  box-shadow: var(--hv-shadow-sm);
}
.hv-pill .pulse {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--hv-brand);
  animation: hv-pulse 2.4s infinite;
}

/* ----- checklist ----- */
.hv-check-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  font-size: 12px;
}
.hv-check-row + .hv-check-row { border-top: 1px solid var(--hv-card-border); }
.hv-check {
  width: 16px; height: 16px;
  border-radius: 5px;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--hv-card-border);
  background: #fff;
}
.hv-check.on {
  background: var(--hv-pass);
  border-color: var(--hv-pass);
}
.hv-check.on::after {
  content: "";
  width: 8px; height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.hv-check.warn {
  background: var(--hv-action);
  border-color: var(--hv-action);
}
.hv-check.warn::after {
  content: "!";
  color: #fff; font-weight: 700; font-size: 10px;
}

/* ----- building tile (used in commercial / btr / block) ----- */
.hv-tile {
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 10px;
  padding: 10px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
  box-shadow: var(--hv-shadow-sm);
}
.hv-tile.tinted {
  background: linear-gradient(180deg, var(--hv-card) 0%, color-mix(in oklab, var(--hv-accent) 6%, var(--hv-card)) 100%);
}
.hv-tile-glyph {
  height: 42px;
  border-radius: 6px;
  background: var(--hv-accent-soft);
  position: relative;
  overflow: hidden;
}
.hv-tile-glyph svg {
  position: absolute; inset: 0; margin: auto;
  width: 100%; height: 100%;
  fill: none; stroke: var(--hv-accent);
  stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round;
  opacity: 0.85;
}
.hv-tile-name {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--hv-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hv-tile-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 9.5px;
  color: var(--hv-text-subtle);
}
.hv-tile-status {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--hv-pass);
}
.hv-tile-status.action { background: var(--hv-action); }
.hv-tile-status.fail { background: var(--hv-fail); }
.hv-tile-status.info { background: var(--hv-info); }

/* ----- flow arrow (between stages) ----- */
.hv-arrow {
  display: inline-flex; align-items: center;
  height: 12px; gap: 0;
  color: var(--hv-accent);
}
.hv-arrow::before {
  content: ""; width: 28px; height: 1.5px;
  background: currentColor;
}
.hv-arrow::after {
  content: ""; width: 0; height: 0;
  border-left: 6px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.hv-arrow.long::before { width: 56px; }
.hv-arrow.dashed::before {
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  background-size: 6px 1.5px;
  height: 1.5px;
}
.hv-arrow.vertical {
  flex-direction: column;
  height: auto; width: 12px;
}
.hv-arrow.vertical::before { width: 1.5px; height: 28px; }
.hv-arrow.vertical::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid currentColor;
  border-bottom: none;
}

/* ----- bar chart (slim, used for dashboards) ----- */
.hv-bar-track {
  height: 4px; border-radius: 2px;
  background: var(--hv-accent-soft);
  position: relative;
  overflow: hidden;
}
.hv-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--hv-accent);
  border-radius: 2px;
}

/* ----- map dot / cluster ----- */
.hv-map-dot {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--hv-card);
  border: 2px solid var(--hv-accent);
  box-shadow: var(--hv-shadow-sm);
}
.hv-map-dot.cluster {
  width: 28px; height: 28px;
  background: var(--hv-accent);
  border: none;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.hv-map-dot.alert {
  background: var(--hv-action);
  border-color: var(--hv-action);
  animation: hv-pulse-dot 2s infinite;
}

/* ----- report preview (a4-ish card) ----- */
.hv-report {
  background: #fff;
  border: 1px solid var(--hv-card-border);
  border-radius: 10px;
  box-shadow: var(--hv-shadow);
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.hv-report-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hv-card-border);
}
.hv-report-head .t {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--hv-text);
}
.hv-report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.hv-report-thumb {
  aspect-ratio: 1.1 / 1;
  border-radius: 4px;
  background: var(--hv-accent-soft);
  position: relative;
  overflow: hidden;
}
.hv-report-thumb::after {
  content: "";
  position: absolute; inset: 24% 28%;
  border: 1.2px solid color-mix(in oklab, var(--hv-accent) 60%, transparent);
  border-radius: 2px;
}
.hv-report-thumb.t1 { background: linear-gradient(135deg, color-mix(in oklab, var(--hv-accent) 30%, white), color-mix(in oklab, var(--hv-accent) 60%, white)); }
.hv-report-thumb.t2 { background: linear-gradient(135deg, color-mix(in oklab, var(--hv-accent) 20%, white), color-mix(in oklab, var(--hv-accent) 50%, white)); }
.hv-report-thumb.t3 { background: linear-gradient(135deg, color-mix(in oklab, var(--hv-accent) 40%, white), color-mix(in oklab, var(--hv-accent) 70%, white)); }
.hv-report-bars {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 4px;
}
.hv-report-bar { height: 4px; border-radius: 2px; background: var(--hv-card-border); }
.hv-report-bar.s1 { width: 90%; }
.hv-report-bar.s2 { width: 65%; }
.hv-report-bar.s3 { width: 78%; }

/* ----- tab strip ----- */
.hv-tabs {
  display: flex; gap: 4px;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 8px;
  padding: 3px;
  font-size: 10.5px;
  font-weight: 600;
}
.hv-tab {
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--hv-text-subtle);
  white-space: nowrap;
}
.hv-tab.on {
  background: var(--hv-accent);
  color: #fff;
}

/* ----- mobile mini ----- */
.hv-mobile {
  position: absolute;
  background: var(--hv-text);
  border-radius: 18px;
  padding: 6px;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: var(--hv-shadow);
}
.hv-mobile-screen {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.hv-mobile-photo {
  background: linear-gradient(135deg, color-mix(in oklab, var(--hv-accent) 35%, white), color-mix(in oklab, var(--hv-accent) 75%, var(--hv-text)));
  position: relative;
}
.hv-mobile-photo::before {
  content: "";
  position: absolute; inset: 16% 22% 28% 22%;
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 4px;
}
.hv-mobile-photo .pin {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--hv-brand);
  box-shadow: 0 0 0 4px rgba(97,206,112,0.3);
  animation: hv-pin 2s infinite;
}

/* ----- floating tag (callouts) ----- */
.hv-callout {
  position: absolute;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 10px;
  padding: 8px 11px;
  box-shadow: var(--hv-shadow);
  font-size: 11px;
  display: flex; align-items: center; gap: 8px;
  z-index: 5;
  animation: hv-float 4s ease-in-out infinite;
}
.hv-callout .ic {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--hv-accent-soft);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hv-callout .ic svg {
  width: 12px; height: 12px;
  fill: none; stroke: var(--hv-accent);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.hv-callout .t { font-weight: 600; color: var(--hv-text); white-space: nowrap; }
.hv-callout .d { font-size: 9.5px; color: var(--hv-text-subtle); margin-top: 1px; }

/* ----- KPI pill ----- */
.hv-kpi {
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 10px;
  padding: 10px 12px;
  position: absolute;
  box-shadow: var(--hv-shadow-sm);
}
.hv-kpi .l {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hv-text-subtle);
  font-weight: 600;
  margin-bottom: 2px;
}
.hv-kpi .v {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--hv-text);
  letter-spacing: -0.01em;
  line-height: 1;
}
.hv-kpi .v small { font-size: 11px; color: var(--hv-accent); margin-left: 4px; font-weight: 600; }

/* =========================================================
 * 3) ANIMATIONS (ambient — disabled by data-motion=off)
 * ========================================================= */
@keyframes hv-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(97,206,112,0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(97,206,112,0); }
}
@keyframes hv-pin {
  0%, 100% { box-shadow: 0 0 0 4px rgba(97,206,112,0.30); }
  50%      { box-shadow: 0 0 0 8px rgba(97,206,112,0.10); }
}
@keyframes hv-pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,166,43,0.45); }
  50%      { box-shadow: 0 0 0 8px rgba(224,166,43,0); }
}
@keyframes hv-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes hv-drift {
  0%, 100% { transform: translateX(0) translateY(0); }
  50%      { transform: translateX(2px) translateY(-3px); }
}
.hv-callout:nth-child(odd)  { animation-delay: -1.5s; }
.hv-callout:nth-child(even) { animation-delay: -0.5s; }

/* =========================================================
 * 4) COMPOSITIONS — 12 page heroes
 *    Each hero lives in its own .hv-stage inside .hv-frame.
 *    Numbers below are tuned for ~640px square.
 * ========================================================= */

/* === RESIDENTIAL — stacked tenancy lifecycle === */
.hv-residential .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-residential .lifecycle {
  position: absolute; left: 22px; right: 22px; top: 64px;
  display: flex; flex-direction: column; gap: 12px;
}
.hv-residential .ten-card {
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 14px;
  box-shadow: var(--hv-shadow-sm);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  position: relative;
}
.hv-residential .ten-card::after {
  content: "";
  position: absolute; left: 30px; top: 100%;
  width: 1.5px; height: 12px;
  background: linear-gradient(180deg, var(--hv-accent) 50%, transparent 50%);
  background-size: 1.5px 4px;
}
.hv-residential .ten-card:last-of-type::after { display: none; }
.hv-residential .ten-addr {
  font-family: 'Poppins', sans-serif;
  font-weight: 600; font-size: 13px;
  color: var(--hv-text);
}
.hv-residential .ten-meta {
  font-size: 11px; color: var(--hv-text-subtle);
  margin-top: 2px;
}
.hv-residential .ten-flow {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--hv-text-muted);
}
.hv-residential .ten-flow .step {
  display: inline-flex; align-items: center; gap: 4px;
}
.hv-residential .ten-flow .step .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--hv-accent);
}
.hv-residential .ten-flow .step.done .dot { background: var(--hv-pass); }
.hv-residential .ten-flow .arr {
  width: 12px; height: 1px; background: var(--hv-card-border);
}
.hv-residential .hv-callout { bottom: 22px; right: 22px; }

/* === COMMERCIAL — multi-site dashboard with map === */
.hv-commercial .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-commercial .topbar {
  position: absolute; top: 64px; left: 22px; right: 22px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11px;
  box-shadow: var(--hv-shadow-sm);
}
.hv-commercial .topbar .stat {
  display: flex; align-items: center; gap: 5px;
  color: var(--hv-text-muted);
}
.hv-commercial .topbar .stat strong { color: var(--hv-text); font-weight: 700; }
.hv-commercial .map {
  position: absolute; left: 22px; top: 116px; right: 22px; height: 200px;
  background:
    radial-gradient(circle at 30% 40%, var(--hv-accent-soft) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, var(--hv-accent-soft) 0%, transparent 40%),
    linear-gradient(180deg, color-mix(in oklab, var(--hv-accent) 8%, white), color-mix(in oklab, var(--hv-accent) 15%, white));
  border: 1px solid var(--hv-card-border);
  border-radius: 12px;
  overflow: hidden;
}
.hv-commercial .map::before {
  /* faint road lines */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(35deg, transparent 49%, rgba(255,255,255,0.5) 49.5%, rgba(255,255,255,0.5) 50.5%, transparent 51%),
    linear-gradient(-25deg, transparent 49%, rgba(255,255,255,0.4) 49.5%, rgba(255,255,255,0.4) 50.5%, transparent 51%);
  background-size: 80px 80px, 110px 110px;
  opacity: 0.7;
}
.hv-commercial .map .hv-map-dot.d1 { left: 22%; top: 28%; }
.hv-commercial .map .hv-map-dot.d2 { left: 48%; top: 38%; }
.hv-commercial .map .hv-map-dot.d3 { left: 36%; top: 58%; }
.hv-commercial .map .hv-map-dot.d4 { left: 64%; top: 64%; }
.hv-commercial .map .hv-map-dot.d5 { left: 78%; top: 36%; }
.hv-commercial .map .hv-map-dot.cluster.c1 { left: 18%; top: 60%; }
.hv-commercial .grid {
  position: absolute; left: 22px; right: 22px; bottom: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.hv-commercial .grid .hv-tile { padding: 8px; }
.hv-commercial .grid .hv-tile-glyph { height: 32px; }
.hv-commercial .hv-callout { top: 130px; right: 30px; }

/* === HOUSING — compliance checklist + report === */
.hv-housing .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-housing .checklist {
  position: absolute; left: 22px; top: 64px; width: 56%;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--hv-shadow);
}
.hv-housing .checklist .head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hv-card-border);
}
.hv-housing .risk-cat {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--hv-card-border);
}
.hv-housing .risk-cat:last-child { border-bottom: none; }
.hv-housing .risk-cat .nm { color: var(--hv-text); font-weight: 500; }
.hv-housing .report-side {
  position: absolute; right: 22px; top: 92px; width: 38%;
  transform: rotate(2deg);
}
.hv-housing .hv-callout { bottom: 22px; left: 22px; }

/* === HOSPITALITY — room cards grid === */
.hv-hospitality .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-hospitality .floor-bar {
  position: absolute; top: 64px; left: 22px; right: 22px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px;
}
.hv-hospitality .room-grid {
  position: absolute; left: 22px; right: 22px; top: 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.hv-hospitality .room-card {
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 12px;
  box-shadow: var(--hv-shadow-sm);
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.hv-hospitality .room-card .num {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--hv-text);
  letter-spacing: -0.02em;
}
.hv-hospitality .room-card .nm {
  font-size: 11px;
  color: var(--hv-text-subtle);
  margin-top: -4px;
}
.hv-hospitality .room-card .checks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-top: 4px;
}
.hv-hospitality .room-card .checks span {
  height: 4px; border-radius: 2px;
  background: var(--hv-pass);
  opacity: 0.85;
}
.hv-hospitality .room-card .checks span.miss { background: var(--hv-card-border); }
.hv-hospitality .hv-callout { bottom: 22px; right: 22px; }

/* === FM — layered system dashboard with tabs === */
.hv-fm .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-fm .console {
  position: absolute; left: 22px; right: 22px; top: 64px; bottom: 22px;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 14px;
  box-shadow: var(--hv-shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.hv-fm .console-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hv-card-border);
  display: flex; align-items: center; justify-content: space-between;
}
.hv-fm .console-body {
  flex: 1; padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hv-fm .schedule {
  display: flex; flex-direction: column; gap: 8px;
}
.hv-fm .sched-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  font-size: 11.5px;
  border-bottom: 1px solid var(--hv-card-border);
}
.hv-fm .sched-row:last-child { border: none; }
.hv-fm .sched-row .day {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: var(--hv-text-subtle);
  text-align: center;
}
.hv-fm .sched-row .nm strong { display: block; font-weight: 600; color: var(--hv-text); font-size: 12px; }
.hv-fm .sched-row .nm span { display: block; font-size: 10.5px; color: var(--hv-text-subtle); }
.hv-fm .kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.hv-fm .kpis .hv-kpi { position: static; }
.hv-fm .kpis .full { grid-column: 1 / -1; }
.hv-fm .hv-callout { bottom: 30px; right: 32px; }

/* === PM — inspection → report transformation === */
.hv-pm .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-pm .stage-l {
  position: absolute; left: 22px; top: 80px; width: 42%;
}
.hv-pm .stage-r {
  position: absolute; right: 22px; top: 80px; width: 42%;
}
.hv-pm .stage-l .hv-mobile,
.hv-pm .stage-r .hv-report { position: relative; width: 100%; }
.hv-pm .arrow-mid {
  position: absolute; left: 50%; top: 200px;
  transform: translateX(-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  box-shadow: var(--hv-shadow);
  display: flex; align-items: center; justify-content: center;
  z-index: 6;
}
.hv-pm .arrow-mid svg {
  width: 22px; height: 22px;
  fill: none; stroke: var(--hv-accent);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.hv-pm .timer {
  position: absolute; left: 50%; bottom: 60px;
  transform: translateX(-50%);
  background: var(--hv-text);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: var(--hv-shadow);
}
.hv-pm .timer strong { color: var(--hv-brand); }

/* === BTR — portfolio-wide consistency === */
.hv-btr .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-btr .grid {
  position: absolute; left: 22px; right: 22px; top: 64px; bottom: 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
}
.hv-btr .bldg {
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 8px;
  padding: 6px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: var(--hv-shadow-sm);
}
.hv-btr .bldg-glyph {
  height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.hv-btr .bldg-glyph svg {
  width: 65%; height: 65%;
  fill: none; stroke: var(--hv-accent);
  stroke-width: 1.4;
  opacity: 0.65;
}
.hv-btr .bldg .stamp {
  position: absolute; right: 6px; top: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--hv-pass);
}
.hv-btr .bldg .stamp.action { background: var(--hv-action); }
.hv-btr .bottom {
  position: absolute; left: 22px; right: 22px; bottom: 22px;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--hv-shadow-sm);
  font-size: 11px;
}
.hv-btr .bottom .label { color: var(--hv-text-muted); }
.hv-btr .bottom .label strong { color: var(--hv-text); font-weight: 700; }

/* === BLOCK — estate hierarchy drill-down === */
.hv-block .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-block .level {
  position: absolute;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: var(--hv-shadow-sm);
  display: flex; align-items: center; gap: 10px;
}
.hv-block .level .ic {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--hv-accent-soft);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hv-block .level .ic svg { width: 14px; height: 14px; fill: none; stroke: var(--hv-accent); stroke-width: 1.8; }
.hv-block .level .meta { flex: 1; }
.hv-block .level .meta strong { display: block; font-size: 12px; font-weight: 600; color: var(--hv-text); }
.hv-block .level .meta span { display: block; font-size: 10.5px; color: var(--hv-text-subtle); }
.hv-block .level.l1 { left: 22px; right: 22px; top: 64px; }
.hv-block .level.l2 { left: 60px; right: 22px; top: 132px; }
.hv-block .level.l3 { left: 100px; right: 22px; top: 200px; }
.hv-block .units {
  position: absolute; left: 138px; right: 22px; top: 268px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.hv-block .units .unit {
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--hv-text);
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--hv-shadow-sm);
}
.hv-block .units .unit .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hv-pass); }
.hv-block .units .unit .dot.action { background: var(--hv-action); }
.hv-block .indent::before {
  content: "";
  position: absolute; left: -20px; top: 50%;
  width: 14px; height: 1px;
  background: var(--hv-accent);
  opacity: 0.4;
}
.hv-block .indent::after {
  content: "";
  position: absolute; left: -20px; top: -16px;
  width: 1px; height: calc(50% + 16px);
  background: var(--hv-accent);
  opacity: 0.4;
}
.hv-block .hv-callout { bottom: 22px; right: 22px; }

/* === ASSET — portfolio intelligence dashboard === */
.hv-asset .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-asset .panel {
  position: absolute; left: 22px; right: 22px; top: 64px;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 14px;
  box-shadow: var(--hv-shadow);
  overflow: hidden;
}
.hv-asset .panel-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hv-card-border);
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 12px;
}
.hv-asset .summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--hv-card-border);
}
.hv-asset .summary .cell {
  padding: 12px 14px;
  border-right: 1px solid var(--hv-card-border);
}
.hv-asset .summary .cell:last-child { border-right: none; }
.hv-asset .summary .l {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hv-text-subtle);
  font-weight: 600;
  margin-bottom: 4px;
}
.hv-asset .summary .v {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--hv-text);
  letter-spacing: -0.01em;
}
.hv-asset .summary .v small { color: var(--hv-accent); font-size: 10px; margin-left: 4px; }
.hv-asset .asset-rows {
  padding: 8px 16px;
}
.hv-asset .asset-row {
  display: grid;
  grid-template-columns: 1fr 60px 50px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  font-size: 11.5px;
  border-bottom: 1px solid var(--hv-card-border);
}
.hv-asset .asset-row:last-child { border-bottom: none; }
.hv-asset .asset-row .nm strong { display: block; font-weight: 600; color: var(--hv-text); font-size: 12px; }
.hv-asset .asset-row .nm span { display: block; font-size: 10.5px; color: var(--hv-text-subtle); }
.hv-asset .asset-row .cond {
  display: flex; align-items: center; gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--hv-text);
}
.hv-asset .asset-row .cond .hv-bar-track {
  flex: 1; min-width: 30px;
}
.hv-asset .hv-callout { bottom: 22px; right: 22px; }

/* === SURVEY — on-site capture → report === */
.hv-survey .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-survey .mob {
  position: absolute; left: 22px; top: 70px;
  width: 200px;
}
.hv-survey .mob .hv-mobile { position: relative; width: 100%; }
.hv-survey .notes {
  position: absolute; left: 22px; bottom: 22px;
  width: 200px;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 10px;
  box-shadow: var(--hv-shadow-sm);
  padding: 10px 12px;
}
.hv-survey .notes .h {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 11px;
  margin-bottom: 6px;
}
.hv-survey .notes .meas {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 0;
  font-size: 11px;
  border-bottom: 1px solid var(--hv-card-border);
}
.hv-survey .notes .meas:last-child { border: none; }
.hv-survey .notes .meas .v { font-family: 'SF Mono', ui-monospace, monospace; font-size: 11px; color: var(--hv-accent); font-weight: 600; }
.hv-survey .report-out {
  position: absolute; right: 22px; top: 70px; bottom: 22px;
  width: 270px;
  display: flex; flex-direction: column;
}
.hv-survey .report-out .hv-report { flex: 1; }
.hv-survey .arrow-mid {
  position: absolute; left: 235px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--hv-shadow-sm);
  z-index: 5;
}
.hv-survey .arrow-mid svg { width: 14px; height: 14px; fill: none; stroke: var(--hv-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* === COMPLIANCE — structured form === */
.hv-compliance .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-compliance .form {
  position: absolute; left: 22px; right: 22px; top: 64px; bottom: 22px;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 14px;
  box-shadow: var(--hv-shadow);
  padding: 14px 18px;
  display: flex; flex-direction: column;
}
.hv-compliance .form-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hv-card-border);
  margin-bottom: 10px;
}
.hv-compliance .form-head .t {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13px;
}
.hv-compliance .cat {
  margin-bottom: 12px;
}
.hv-compliance .cat-name {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hv-text-subtle);
  font-weight: 700;
  margin-bottom: 6px;
}
.hv-compliance .cat-items {
  display: grid; gap: 4px;
}
.hv-compliance .cat-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 11.5px;
  border-bottom: 1px solid var(--hv-card-border);
}
.hv-compliance .cat-item:last-child { border: none; }
.hv-compliance .progress {
  margin-top: auto;
  display: flex; align-items: center; gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hv-card-border);
  font-size: 11px;
  color: var(--hv-text-muted);
}
.hv-compliance .progress .hv-bar-track { flex: 1; height: 6px; }

/* === SPECIALIST — flexible templates === */
.hv-specialist .hv-pill { top: 22px; left: 22px; position: absolute; }
.hv-specialist .tabset {
  position: absolute; top: 64px; left: 22px; right: 22px;
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.hv-specialist .tpl-card {
  position: absolute;
  background: var(--hv-card);
  border: 1px solid var(--hv-card-border);
  border-radius: 14px;
  box-shadow: var(--hv-shadow);
  padding: 14px 16px;
  width: 70%;
}
.hv-specialist .tpl-card.front { left: 50%; top: 130px; transform: translateX(-50%) rotate(-1.5deg); z-index: 3; }
.hv-specialist .tpl-card.mid   { left: 50%; top: 130px; transform: translateX(-50%) translateY(8px) rotate(2deg); z-index: 2; opacity: 0.6; filter: blur(0.3px); }
.hv-specialist .tpl-card.back  { left: 50%; top: 130px; transform: translateX(-50%) translateY(16px) rotate(-3deg); z-index: 1; opacity: 0.35; filter: blur(0.6px); }
.hv-specialist .tpl-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hv-card-border);
  margin-bottom: 10px;
}
.hv-specialist .tpl-head .t {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 12px;
}
.hv-specialist .tpl-head .ic {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--hv-accent-soft);
  display: inline-flex; align-items: center; justify-content: center;
}
.hv-specialist .tpl-head .ic svg { width: 14px; height: 14px; fill: none; stroke: var(--hv-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hv-specialist .tpl-list {
  display: flex; flex-direction: column; gap: 4px;
}
.hv-specialist .tpl-list .item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0;
  font-size: 11px;
  color: var(--hv-text);
  border-bottom: 1px solid var(--hv-card-border);
}
.hv-specialist .tpl-list .item:last-child { border: none; }
.hv-specialist .switcher {
  position: absolute; left: 50%; bottom: 22px;
  transform: translateX(-50%);
  background: var(--hv-text);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--hv-shadow);
}
.hv-specialist .switcher .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hv-brand); animation: hv-pulse 2.4s infinite; }
