:root {
  --bg0: #09090D;
  --bg1: #0E0E13;
  --panel: rgba(20, 17, 22, 0.86);
  --panel2: rgba(28, 23, 32, 0.84);
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.18);
  --text: #F4F2F5;
  --muted: rgba(244,242,245,0.66);
  --muted-2: rgba(244,242,245,0.42);
  --body-shape-gesture: #58D487;
  --locomotion-path: #5EC7E8;
  --object-force-propulsion: #F2B84B;
  --object-transfer-containment: #FFD166;
  --dynamic-object-manipulation: #FF4BB8;
  --contact-surface-manipulation: #b05ed6;
  --other: #A68BFF;
  --brand: #FF4BB8;
  --brand-2: #b05ed6;
  --shadow: 0 26px 90px rgba(0,0,0,.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg0); }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 4%, rgba(255,75,184,.16), transparent 30rem),
    radial-gradient(circle at 84% 18%, rgba(182,76,255,.12), transparent 30rem),
    radial-gradient(circle at 52% 96%, rgba(94,199,232,.10), transparent 34rem),
    linear-gradient(180deg, #09090D 0%, #0F0D13 48%, #09090D 100%);
}
code { color: #f4b3dd; }

.hiphi-mov-showcase {
  width: min(1500px, calc(100vw - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 34px;
}

.hero {
  min-height: 118px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}
.eyebrow { margin: 0 0 9px; color: rgba(244,248,251,.78); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 850; }
.hero h1 { max-width: 1040px; margin: 0; font-size: clamp(36px, 3.8vw, 56px); line-height: 1.0; letter-spacing: -0.055em; font-weight: 860; }
.hero-copy { max-width: 760px; margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.generated-at { flex: 0 0 auto; margin: 6px 0 0; color: var(--muted-2); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.kpi-card {
  position: relative;
  min-height: 132px;
  padding: 17px 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025)),
    rgba(18, 26, 31, .78);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 18px 45px rgba(0,0,0,.28);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.kpi-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 24px 62px rgba(0,0,0,.34); }
.kpi-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); opacity: .95; }
.kpi-card::after { content: ""; position: absolute; inset: -40% -35% auto auto; width: 130px; height: 130px; border-radius: 50%; background: color-mix(in srgb, var(--accent), transparent 82%); filter: blur(18px); }
.kpi-icon { position: relative; z-index: 1; width: 25px; height: 25px; color: var(--accent); opacity: .92; }
.kpi-icon svg { display: block; width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kpi-value { position: relative; z-index: 1; margin-top: 14px; font-size: clamp(32px, 2.7vw, 42px); line-height: .95; font-weight: 850; letter-spacing: -0.055em; }
.kpi-label { position: relative; z-index: 1; margin-top: 9px; color: var(--text); font-weight: 780; font-size: 13px; }
.kpi-sub { position: relative; z-index: 1; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; }

.panel-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 18px; }
.viz-panel, .warnings-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.viz-panel { min-height: 600px; }
.distribution-panel { min-height: 860px; }
.panel-header { padding: 22px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-header h2, .warnings-panel h2 { margin: 0; font-size: 13px; font-weight: 860; letter-spacing: .11em; text-transform: uppercase; }
.panel-header p { max-width: 620px; margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.42; }
.viz-body {
  min-height: 0;
  height: clamp(300px, calc(100vh - 170px), 720px);
  padding: 4px 20px 20px;
  position: relative;
  overflow: visible;
}

.universe-svg, .distribution-svg { display: block; width: 100%; overflow: visible; }
.center-visual { pointer-events: none; }
.center-core {
  fill: rgba(10, 16, 20, 0.74);
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1.2px;
}
.center-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 0.9px;
}
.center-comet-arc {
  fill: var(--brand);
  opacity: 0.95;
  filter: none;
}
.center-brand {
  fill: rgba(255, 255, 255, 0.97);
  font-size: var(--semantic-center-brand-size, 28px);
  font-weight: 870;
  letter-spacing: -0.035em;
}
.center-hours {
  fill: rgba(255, 255, 255, 0.98);
  font-size: var(--semantic-center-hours-size, 23px);
  font-weight: 850;
  letter-spacing: -0.025em;
}
.center-plus {
  fill: var(--brand);
  font-size: var(--semantic-center-small-size, 9.5px);
  font-weight: 850;
  letter-spacing: 0.045em;
}
.center-unit {
  fill: rgba(255, 255, 255, 0.78);
  font-size: var(--semantic-center-small-size, 9.5px);
  font-weight: 820;
  letter-spacing: 0.12em;
}
.center-subtitle {
  fill: rgba(210, 224, 232, 0.72);
  font-size: var(--semantic-center-subtitle-size, 10px);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ongoing-pill rect {
  fill: rgba(255, 75, 184, 0.075);
  stroke: rgba(255, 75, 184, 0.42);
  stroke-width: 1px;
}
.ongoing-pill text {
  fill: rgba(220, 244, 248, 0.9);
  font-size: var(--semantic-pill-text-size, 9px);
  font-weight: 800;
  letter-spacing: 0.095em;
}
.ongoing-dot {
  fill: var(--brand);
  animation: ongoingPulse 1.8s ease-in-out infinite;
}
@keyframes ongoingPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ongoing-dot { animation: none !important; }
}
.semantic-arc, .outer-tick { pointer-events: all; }
.arc-label { fill: rgba(255,255,255,.92); font-weight: 800; letter-spacing: -0.01em; pointer-events: none; paint-order: stroke; stroke: rgba(5,8,12,.72); stroke-width: var(--semantic-arc-label-stroke, 3px); stroke-linejoin: round; }
.arc-label-name.depth-1 { font-size: var(--semantic-arc-name-1-size, 12px); }
.arc-label-name.depth-2 { font-size: var(--semantic-arc-name-2-size, 8.8px); fill: rgba(255,255,255,.86); letter-spacing: -0.035em; }
.arc-label-percent { font-size: var(--semantic-arc-percent-size, 10.5px); fill: rgba(255,255,255,.76); font-weight: 750; }
.arc-label-percent.depth-2 { font-size: var(--semantic-arc-percent-2-size, 8.5px); }

.universe-callouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 9px 14px;
  width: min(760px, calc(100% - 24px));
  margin: 2px auto 8px;
  overflow: visible;
}
.semantic-layout-side {
  display: grid !important;
  grid-template-columns: minmax(145px, var(--semantic-side-column, 200px)) minmax(280px, 1fr) minmax(145px, var(--semantic-side-column, 200px));
  grid-template-areas: "callouts-left chart callouts-right";
  align-items: center;
  column-gap: 16px;
}
.semantic-layout-side .universe-svg { grid-area: chart; align-self: center; }
.universe-side-callouts {
  display: grid;
  gap: 10px;
  align-content: center;
  min-width: 0;
  overflow: visible;
}
.universe-side-callouts[data-side="left"] { grid-area: callouts-left; }
.universe-side-callouts[data-side="right"] { grid-area: callouts-right; }
.semantic-layout-side .callout-group p { display: block; }
.universe-callouts.is-brief .callout-group p,
.semantic-layout-brief .universe-callouts .callout-group p { display: none; }
.semantic-layout-narrow.semantic-layout-bottom:not(.semantic-layout-brief) .universe-callouts {
  grid-template-columns: 1fr;
  gap: 4px;
  width: min(720px, calc(100% - 14px));
}
.semantic-layout-narrow.semantic-layout-bottom:not(.semantic-layout-brief) .callout-group {
  padding-left: 7px;
}
.semantic-layout-narrow.semantic-layout-bottom:not(.semantic-layout-brief) .callout-group h4 {
  display: inline;
  margin: 0 5px 0 0;
  font-size: 9.5px;
}
.semantic-layout-narrow.semantic-layout-bottom:not(.semantic-layout-brief) .callout-group p {
  display: inline;
  font-size: 9px;
  line-height: 1.16;
}
.callout-group { min-width: 0; border-left: 2px solid var(--group-color); padding-left: 10px; opacity: .98; }
.callout-group h4 { margin: 0 0 3px; color: var(--group-color); font-size: 11px; font-weight: 820; overflow-wrap: anywhere; }
.callout-group p { margin: 0; color: rgba(226,236,242,.62); font-size: 10.5px; line-height: 1.24; overflow-wrap: anywhere; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.motion-tag-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.motion-tag-header p { max-width: 660px; }
.motion-tag-filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 0;
  max-width: 100%;
}
.motion-tag-filter-row .chip { flex: 0 0 auto; }
.motion-tag-body { min-height: 720px; padding-top: 0; padding-bottom: 14px; }
.motion-tag-body .coverage-callout { position: absolute; z-index: 3; left: 24px; right: 24px; bottom: 28px; }

.filter-chips.compact { justify-content: flex-start; }
.chip { border: 1px solid rgba(255,255,255,.13); color: var(--muted); background: rgba(255,255,255,.04); border-radius: 999px; padding: 5px 8px; cursor: pointer; font: inherit; font-size: 10.5px; line-height: 1; }
.chip:not([data-family="all"]) { border-color: color-mix(in srgb, var(--group-color), white 16%); background: color-mix(in srgb, var(--group-color), transparent 90%); }
.chip.active { color: var(--text); background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.26); }
.bubble { transition: opacity 160ms ease, stroke-width 160ms ease; }
.motion-tag-bubble { vector-effect: non-scaling-stroke; }
.bubble-label, .bubble-percent { text-anchor: middle; pointer-events: none; fill: rgba(255,255,255,.96); font-weight: 850; font-size: 11px; paint-order: stroke; stroke: rgba(4,7,10,.82); stroke-width: 3px; stroke-linejoin: round; }
.bubble-percent { fill: rgba(255,255,255,.74); font-weight: 700; font-size: 10.5px; stroke-width: 2px; }
.coverage-callout { margin-top: -4px; color: var(--muted); font-size: 12px; }
.tail-copy { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.tail-copy strong { color: var(--text); font-size: 13px; }
.tail-copy span { color: var(--muted-2); }
.tail-footnote { margin-top: 6px; color: var(--muted-2); font-size: 11px; text-align: right; }
.tail-bar { display: flex; height: 7px; margin-top: 8px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08); }
.tail-bar .top { background: linear-gradient(90deg, var(--object-force-propulsion), var(--contact-surface-manipulation)); }
.tail-bar .tail { background: linear-gradient(90deg, rgba(74,157,255,.55), rgba(119,221,111,.5), rgba(38,208,215,.45), rgba(177,124,255,.42)); }

.hiphi-mov-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(8, 12, 16, .92);
  border: 1px solid rgba(255,255,255,.16);
  color: var(--text);
  box-shadow: 0 18px 42px rgba(0,0,0,.38);
  backdrop-filter: blur(12px);
  pointer-events: none;
  font-size: 12px;
  line-height: 1.5;
}
.hiphi-mov-tooltip strong { display: block; margin-bottom: 6px; font-size: 12.5px; }
.hiphi-mov-tooltip span { display: block; color: var(--muted); }
.semantic-tooltip-name { margin-bottom: 3px !important; color: rgba(255,255,255,.97) !important; font-size: 14px !important; font-weight: 850 !important; letter-spacing: .01em; }
.semantic-tooltip-kind { color: rgba(226,236,242,.66) !important; font-size: 11px !important; font-weight: 760 !important; letter-spacing: .08em; text-transform: uppercase; }

.warnings-panel { margin-top: 18px; padding: 16px 20px; opacity: .72; }
.warnings-panel ul { margin: 9px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.error-panel { margin: 10vh auto; max-width: 760px; border: 1px solid rgba(255,95,135,.45); border-radius: 20px; background: rgba(255,95,135,.08); padding: 24px; }
.error-panel strong, .error-panel span { display: block; }
.error-panel span { margin-top: 8px; color: var(--muted); }

@media (max-width: 1180px) {
  .hero { max-height: none; }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel-grid { grid-template-columns: 1fr; }
  .viz-panel { min-height: 600px; }
}
@media (max-height: 940px) and (min-width: 641px) {
  .distribution-panel { min-height: 900px; }
  .motion-tag-body { min-height: 760px; }
  .motion-tag-body .coverage-callout { bottom: 28px; }
}
@media (max-width: 640px) {
  .hiphi-mov-showcase { width: min(100vw - 24px, 1500px); padding: 18px 0 28px; }
  .hero { display: block; min-height: 0; margin-bottom: 16px; }
  .hero h1 { font-size: clamp(34px, 11vw, 48px); }
  .hero-copy { font-size: 14px; }
  .generated-at { margin-top: 12px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-card { min-height: 132px; padding: 18px 16px; }
  .panel-header { display: block; padding: 18px 16px 0; }
  .filter-chips.compact { justify-content: flex-start; }
  .viz-body { height: clamp(320px, calc(100vh - 148px), 640px); padding-inline: 10px; }
  .universe-callouts { grid-template-columns: 1fr; }
  .tail-copy { display: block; }
  .tail-copy span { display: block; margin-top: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

@media (max-height: 500px) {
  .semantic-standalone { padding: 8px 0 10px; }
  .semantic-only-panel .panel-header { padding: 12px 18px 0; }
  .semantic-only-panel .panel-header p { display: none; }
  .semantic-only-panel .viz-body { padding: 0 18px 12px; }
  .universe-callouts { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 6px 10px; width: min(720px, calc(100% - 18px)); }
  .callout-group { padding-left: 8px; }
  .callout-group h4 { margin-bottom: 0; font-size: 10px; }
  .callout-group p { display: none; }
  .semantic-layout-side { column-gap: 10px; }
  .semantic-layout-side .universe-side-callouts { gap: 6px; }
  .semantic-layout-side .callout-group h4 { margin-bottom: 1px; font-size: 10px; }
  .semantic-layout-side .callout-group p { display: block; font-size: 9px; line-height: 1.14; }
}
@media (max-width: 640px) and (max-height: 700px) {
  .universe-callouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) and (max-height: 700px) {
  .universe-callouts { grid-template-columns: 1fr; gap: 4px; width: min(720px, calc(100% - 14px)); }
  .callout-group { padding-left: 7px; }
  .callout-group h4 { display: inline; margin: 0 5px 0 0; font-size: 9.5px; }
  .callout-group p { display: inline; font-size: 9px; line-height: 1.16; }
}
@media (min-width: 421px) and (max-width: 640px) and (max-height: 560px) {
  .semantic-layout-narrow.semantic-layout-bottom .universe-callouts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
  .semantic-layout-narrow.semantic-layout-bottom .callout-group h4 { display: block; margin: 0; font-size: 10px; }
  .semantic-layout-narrow.semantic-layout-bottom .callout-group p { display: none; }
}
@media (max-height: 340px) {
  .universe-callouts { display: none; }
}

body { overflow-x: hidden; }
.hero h1 { text-wrap: balance; }
@media (max-width: 640px) {
  .hero h1 { font-size: clamp(30px, 9vw, 40px); line-height: 1.02; letter-spacing: -0.045em; max-width: 100%; }
  .kpi-label, .kpi-sub { overflow-wrap: anywhere; }
}
@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-card { min-width: 0; padding: 16px 14px; }
  .kpi-value { font-size: clamp(28px, 8vw, 34px); }
  .kpi-label { font-size: 12px; }
  .kpi-sub { font-size: 11px; }
}
@media (max-width: 640px) {
  .hiphi-mov-showcase { width: 100%; padding-left: 6px; padding-right: 6px; }
  .kpi-grid { width: 100%; grid-template-columns: repeat(2, calc((100% - 10px) / 2)); }
  .kpi-card { width: 100%; max-width: 100%; }
}
@media (max-width: 640px) {
  .hiphi-mov-showcase { width: 100vw; max-width: 100vw; margin: 0; overflow: hidden; }
  .hero, .kpi-grid, .panel-grid, .warnings-panel { max-width: calc(100vw - 12px); }
  .hero h1, .hero-copy { overflow-wrap: anywhere; }
}
@media (max-width: 640px) {
  .kpi-grid { display: flex; flex-wrap: wrap; gap: 10px; }
  .kpi-card { flex: 0 0 calc(50vw - 11px); }
}
@media (max-width: 640px) {
  .kpi-card { flex-basis: min(185px, calc(50% - 5px)); }
}
.warnings-panel[hidden] { display: none; }
@media (max-width: 640px) {
  .hero, .kpi-grid, .panel-grid, .warnings-panel { width: calc(100vw - 12px); margin-left: auto; margin-right: auto; }
  .hero-copy { max-width: 100%; }
}
@media (max-width: 640px) {
  .hero-copy { width: calc(100vw - 28px); max-width: calc(100vw - 28px); }
}
.mobile-break { display: none; }
@media (max-width: 640px) { .mobile-break { display: block; } }


/* Fast semantic-universe-only composition. */
body { min-height: 0; }
html:has(.semantic-standalone),
body:has(.semantic-standalone) {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.semantic-standalone {
  display: flex;
  width: min(1040px, calc(100vw - 48px));
  height: 100vh;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(14px, 4vh, 34px) 0 clamp(14px, 4vh, 36px);
}
.semantic-only-panel { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.semantic-only-panel .panel-header { flex: 0 0 auto; padding-top: 24px; }
.semantic-only-panel .panel-header p { max-width: 760px; overflow-wrap: anywhere; }
.semantic-only-panel .viz-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  height: auto;
  min-height: 0;
  padding: 6px 24px 24px;
}
.semantic-only-panel .universe-callouts { margin-top: -2px; }
@media (max-width: 720px) {
  .semantic-standalone { width: min(100vw - 24px, 1040px); padding: 16px 0 20px; }
  .semantic-only-panel { min-height: auto; }
  .semantic-only-panel .panel-header { padding-inline: 16px; }
  .semantic-only-panel .panel-header p { max-width: min(300px, calc(100vw - 92px)); }
  .semantic-only-panel .viz-body { min-height: 0; padding: 4px 14px 18px; }
}
@media (max-height: 500px) {
  .universe-callouts { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 6px 10px; width: min(720px, calc(100% - 18px)); }
  .callout-group { padding-left: 8px; }
  .callout-group h4 { margin-bottom: 0; font-size: 10px; }
  .callout-group p { display: none; }
}
@media (max-width: 640px) and (max-height: 700px) {
  .universe-callouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) and (max-height: 700px) {
  .universe-callouts { grid-template-columns: 1fr; gap: 4px; width: min(720px, calc(100% - 14px)); }
  .callout-group { padding-left: 7px; }
  .callout-group h4 { display: inline; margin: 0 5px 0 0; font-size: 9.5px; }
  .callout-group p { display: inline; font-size: 9px; line-height: 1.16; }
}
@media (min-width: 421px) and (max-width: 640px) and (max-height: 560px) {
  .semantic-layout-narrow.semantic-layout-bottom .universe-callouts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
  .semantic-layout-narrow.semantic-layout-bottom .callout-group h4 { display: block; margin: 0; font-size: 10px; }
  .semantic-layout-narrow.semantic-layout-bottom .callout-group p { display: none; }
}
@media (max-height: 340px) {
  .universe-callouts { display: none; }
}
