: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 18% 6%, rgba(255,75,184,.18), transparent 32rem),
    radial-gradient(circle at 82% 16%, rgba(176,94,214,.14), transparent 30rem),
    radial-gradient(circle at 50% 95%, rgba(94,199,232,.07), transparent 34rem),
    linear-gradient(180deg, #09090D 0%, #0E0E13 48%, #08080c 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),
    inset 0 1px 0 rgba(255,255,255,.04);
  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: 520px; padding: 4px 20px 20px; position: relative; }

.universe-svg, .distribution-svg { display: block; width: 100%; overflow: visible; }
.center-visual { pointer-events: none; }
.center-core {
  fill: rgba(12, 12, 18, 0.78);
  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: 28px;
  font-weight: 870;
  letter-spacing: -0.035em;
}
.center-hours {
  fill: rgba(255, 255, 255, 0.98);
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -0.025em;
}
.center-plus {
  fill: var(--brand);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.045em;
}
.center-unit {
  fill: rgba(255, 255, 255, 0.78);
  font-size: 9.5px;
  font-weight: 820;
  letter-spacing: 0.12em;
}
.center-subtitle {
  fill: rgba(210, 224, 232, 0.72);
  font-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(250, 224, 244, 0.9);
  font-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(7,7,12,.76); stroke-width: 3px; stroke-linejoin: round; }
.arc-label-name.depth-1 { font-size: 12px; }
.arc-label-name.depth-2 { font-size: 8.8px; fill: rgba(255,255,255,.86); letter-spacing: -0.035em; }
.arc-label-percent { font-size: 10.5px; fill: rgba(255,255,255,.76); font-weight: 750; }
.arc-label-percent.depth-2 { font-size: 8.5px; }

.universe-callouts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 12px; margin: -4px 2px 0; max-height: 118px; overflow: hidden; }
.callout-group { 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; }
.callout-group p { margin: 0; color: rgba(244,242,245,.62); font-size: 11px; line-height: 1.32; }

.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(7,7,12,.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(--brand), var(--contact-surface-manipulation)); }
.tail-bar .tail { background: linear-gradient(90deg, rgba(94,199,232,.50), rgba(88,212,135,.46), rgba(176,94,214,.46), rgba(255,75,184,.42)); }

.hiphi-mov-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: min(280px, calc(100vw - 24px));
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(11, 10, 15, .94);
  border: 1px solid rgba(255,75,184,.22);
  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 { padding-inline: 10px; min-height: 520px; }
  .universe-callouts { grid-template-columns: 1fr; max-height: 170px; }
  .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; }
}

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: 100vh; }
.semantic-standalone {
  width: min(1040px, calc(100vw - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 0px 0 36px;
}
.semantic-only-panel {
  min-height: min(900px, calc(100vh - 70px));
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.semantic-only-panel .panel-header { padding-top: 24px; }
.semantic-only-panel .panel-header p { max-width: 760px; }
.semantic-only-panel .viz-body {
  min-height: 700px;
  padding: 6px 24px 24px;
}
.semantic-only-panel .universe-callouts { margin-top: -52px; }
.semantic-only-panel .universe-callouts .callout-group:nth-child(even) { transform: translateX(300px); }
@media (max-width: 720px) {
  .semantic-standalone { width: min(100vw - 24px, 1040px); padding: 16px 0 20px; }
  .semantic-only-panel { min-height: auto; }
  .semantic-only-panel .viz-body { min-height: 620px; padding: 4px 14px 18px; }
}
