/* Result design system — cards, compass, motion, ads slots */

.animus-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 0 0 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.animus-card-kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.animus-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  margin: 0 0 8px;
  color: var(--white);
}

.animus-card-body { color: var(--text); }
.animus-muted { color: var(--muted2); }
.animus-fine { font-size: 12px; color: var(--muted); }
.animus-legacy {
  border: 1px dashed var(--gold2);
  padding: 10px 12px;
  font-size: 13px;
  margin: 12px 0;
}

.animus-meter {
  height: 8px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0;
}
.animus-meter > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold2), var(--gold));
  transition: width 0.7s ease;
}

.animus-why, .animus-more { margin-top: 8px; }
.animus-why > summary, .animus-more > summary {
  cursor: pointer;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.animus-why > summary:focus, .animus-more > summary:focus,
.animus-card a:focus, .intro-mode-btn:focus, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.animus-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border2);
  padding: 2px 6px;
  border-radius: 99px;
  margin-left: 6px;
  vertical-align: middle;
}
.animus-badge--estimated { color: var(--muted2); }
.animus-badge--documented { color: var(--green); }

.animus-fig-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 20px;
  color: var(--gold);
}
.animus-fig-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
}

.animus-compass {
  width: min(100%, 320px);
  height: auto;
  display: block;
  margin: 12px auto;
  border: 1px solid var(--border2);
  background: var(--surface);
}
.animus-compass-bg { fill: var(--surface2); stroke: var(--border2); }
.animus-compass-q-ul { fill: rgba(168, 52, 52, 0.38); }
.animus-compass-q-ur { fill: rgba(196, 158, 72, 0.36); }
.animus-compass-q-ll { fill: rgba(46, 90, 148, 0.36); }
.animus-compass-q-lr { fill: rgba(46, 122, 82, 0.34); }
body.light-mode .animus-compass-q-ul { fill: rgba(196, 72, 72, 0.28); }
body.light-mode .animus-compass-q-ur { fill: rgba(210, 168, 64, 0.28); }
body.light-mode .animus-compass-q-ll { fill: rgba(56, 102, 176, 0.24); }
body.light-mode .animus-compass-q-lr { fill: rgba(46, 140, 88, 0.24); }
.animus-compass-axis { stroke: rgba(240, 236, 228, 0.35); }
body.light-mode .animus-compass-axis { stroke: rgba(26, 23, 20, 0.28); }
.animus-compass-label { fill: var(--text); font-size: 8px; font-family: 'DM Sans', sans-serif; }
.animus-compass-dot {
  fill: var(--gold);
  stroke: #080808;
  stroke-width: 1.5;
  transition: cx 0.8s ease, cy 0.8s ease;
}
body.light-mode .animus-compass-dot { stroke: #fff; }
.animus-compass-other { fill: var(--muted2); opacity: 0.7; }

.animus-cultural-track {
  position: relative;
  height: 8px;
  background: linear-gradient(90deg, #8a6f3e, #c8a96e, #6ea0c8);
  border-radius: 99px;
  margin: 12px 0 6px;
}
.animus-cultural-track > span {
  position: absolute;
  top: -5px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gold);
}
.animus-cultural-ends {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted2);
}

.animus-card--deeper {
  border-color: var(--gold2);
  background: linear-gradient(180deg, rgba(200, 169, 110, 0.08), var(--surface));
}

.animus-results-scan {
  display: grid;
  gap: 12px;
}
.animus-results-scan .animus-compass-block {
  grid-column: 1 / -1;
}
@media (min-width: 720px) {
  .animus-results-scan { grid-template-columns: 1fr 1fr; }
}

.animus-ad-host:empty,
.animus-ad-host[hidden] {
  display: none;
}
.animus-ad-slot {
  max-width: 336px;
  margin: 20px auto;
  padding: 0;
  min-height: 0;
  text-align: center;
}

.animus-link { color: var(--gold); }

.figures-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}
.figures-toolbar input, .figures-toolbar select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.is-hidden { display: none !important; }

.animus-seg,
.animus-depth-bar {
  display: inline-flex;
  border: 1px solid var(--border2);
  margin: 0 8px 14px 0;
}
.animus-seg-btn {
  appearance: none;
  background: transparent;
  color: var(--muted2);
  border: none;
  padding: 10px 16px;
  min-height: 44px;
  font-family: var(--font-ui, 'DM Sans', sans-serif);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.animus-seg-btn.is-on {
  background: rgba(200, 169, 110, 0.14);
  color: var(--gold);
}

.animus-compass-block { margin-bottom: 18px; }
.animus-view-toggle { margin-bottom: 14px; }
.compass-pane { min-width: 0; }

.cube-lead {
  font-family: var(--font-ui, 'DM Sans', sans-serif);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 12px;
}
.cube-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted2);
  justify-content: center;
}
.cube-key {
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.cube-key-x { background: #c8a96e; }
.cube-key-y { background: #6ea0c8; transform: rotate(90deg); }
.cube-key-z { background: #7c5cbf; transform: rotate(35deg); }
.cube-stage {
  perspective: 900px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  touch-action: none;
  cursor: grab;
  user-select: none;
  border: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 8px;
}
.cube-stage.is-dragging { cursor: grabbing; }
.cube-stage:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.cube-scale {
  transform: scale(1);
  transform-style: preserve-3d;
}
.cube-scene {
  width: 156px;
  height: 156px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--cube-pitch, -6deg)) rotateY(var(--cube-yaw, 0deg));
  will-change: transform;
  animation: none;
}
.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}
.cube-face {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(200, 169, 110, 0.42);
  background: rgba(12, 12, 12, 0.1);
  backface-visibility: visible;
  pointer-events: none;
}
.cube-front { transform: translateZ(78px); }
.cube-back { transform: rotateY(180deg) translateZ(78px); }
.cube-right { transform: rotateY(90deg) translateZ(78px); }
.cube-left { transform: rotateY(-90deg) translateZ(78px); }
.cube-top { transform: rotateX(90deg) translateZ(78px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(78px); }
.cube-axis {
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(200, 169, 110, 0.7);
  transform-style: preserve-3d;
}
.cube-axis-x { width: 156px; height: 2px; margin: -1px 0 0 -78px; }
.cube-axis-y { width: 2px; height: 156px; margin: -78px 0 0 -1px; background: rgba(110, 160, 200, 0.75); }
.cube-axis-z { width: 2px; height: 156px; margin: -78px 0 0 -1px; background: rgba(124, 92, 191, 0.75); transform: rotateX(90deg); }
.cube-cap {
  position: absolute;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.7);
  white-space: nowrap;
}
.cube-cap-r { left: 100%; top: 50%; margin: -6px 0 0 8px; }
.cube-cap-l { right: 100%; top: 50%; margin: -6px 8px 0 0; }
.cube-cap-u { left: 50%; top: -18px; margin-left: -22px; }
.cube-cap-d { left: 50%; bottom: -18px; margin-left: -28px; }
.cube-cap-f { left: 50%; top: 50%; transform: translate3d(-24px, 8px, 88px); }
.cube-cap-b { left: 50%; top: 50%; transform: translate3d(-24px, 8px, -88px); }
.cube-sphere {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  transform: translate3d(var(--sx, 0px), var(--sy, 0px), var(--sz, 0px));
  transform-style: preserve-3d;
}
.cube-sphere-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff6d4 0%, #e4c078 28%, #c8a96e 52%, #6a5224 100%);
  box-shadow: inset -3px -4px 7px rgba(40, 24, 8, 0.45), 0 0 16px rgba(200, 169, 110, 0.7);
  transform: rotateY(calc(var(--cube-yaw, 0deg) * -1)) rotateX(calc(var(--cube-pitch, 0deg) * -1));
}
.cube-sphere-core::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 5px;
  width: 7px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  filter: blur(0.4px);
}
.cube-sphere-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(240, 208, 144, 0.45);
  transform-style: preserve-3d;
  pointer-events: none;
}
.cube-path {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.cube-path span {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.cube-path span.is-on {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.cube-caption {
  text-align: center;
  font-size: 13px;
  color: var(--muted2);
  margin: 8px 0 0;
  min-height: 2.4em;
}
.sc-card .animus-view-toggle,
.sc-card .cube-lead,
.sc-card .cube-legend,
.sc-card .cube-caption,
.sc-card [data-compass-pane="3d"] { display: none; }
.sc-card [data-compass-pane="2d"] { display: block !important; }
.sc-card .cube-stage { height: 168px; }

body.light-mode .cube-face {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(138, 111, 62, 0.45);
}
body.light-mode .cube-cap { color: rgba(26, 23, 20, 0.7); }
body.light-mode .cube-sphere-core {
  box-shadow: inset -3px -4px 7px rgba(40, 24, 8, 0.25), 0 0 14px rgba(200, 169, 110, 0.45);
}

@media (max-width: 640px) {
  .cube-stage { height: 240px; }
  .cube-scale { transform: scale(0.86); }
  .cube-cap { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .cube-scene { animation: none; }
  .animus-meter > span, .animus-compass-dot, .c3d-scene { transition: none; }
  html { scroll-behavior: auto; }
}
