/* Desktop-only gate and global no-motion policy. */

.desktop-required {
  display: none;
}

body[data-mobile-blocked="true"] {
  min-height: 100dvh;
  overflow: hidden !important;
  background: #f6f8fb;
  color: #10213d;
}

body[data-mobile-blocked="true"] .app-topbar,
body[data-mobile-blocked="true"] .decision-shell,
body[data-mobile-blocked="true"] .score-gate,
body[data-mobile-blocked="true"] .toast {
  display: none !important;
}

body[data-mobile-blocked="true"] .desktop-required {
  display: grid;
  min-height: 100dvh;
  padding: 24px;
  place-items: center;
}

.desktop-required-panel {
  width: min(100%, 520px);
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(16, 33, 61, .12);
  padding: 28px;
}

.desktop-required-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #c9d8f2;
  border-radius: 999px;
  background: #eef4ff;
  color: #1558b0;
  font-size: 12px;
  font-weight: 800;
  padding: 0 11px;
}

.desktop-required-panel h1 {
  margin: 18px 0 10px;
  color: #10213d;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.desktop-required-panel p {
  margin: 0;
  color: #52647c;
  font-size: 15px;
  line-height: 1.8;
}

.desktop-required-meta {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.desktop-required-meta span {
  border: 1px solid #d7e0ea;
  border-radius: 10px;
  background: #f8fafc;
  color: #203654;
  font-size: 13px;
  font-weight: 800;
  padding: 12px 14px;
}

@media (max-width: 820px) {
  body:not([data-mobile-blocked="false"]) {
    min-height: 100dvh;
    overflow: hidden !important;
  }

  body:not([data-mobile-blocked="false"]) .app-topbar,
  body:not([data-mobile-blocked="false"]) .decision-shell,
  body:not([data-mobile-blocked="false"]) .score-gate,
  body:not([data-mobile-blocked="false"]) .toast {
    display: none !important;
  }

  body:not([data-mobile-blocked="false"]) .desktop-required {
    display: grid;
    min-height: 100dvh;
    padding: 24px;
    place-items: center;
  }
}

*,
*::before,
*::after,
html body [class][class][class],
html body [class][class][class]::before,
html body [class][class][class]::after,
html body [id][id],
html body [id][id]::before,
html body [id][id]::after {
  animation: none !important;
  animation-delay: 0s !important;
  animation-duration: 0s !important;
  animation-iteration-count: 1 !important;
  transition: none !important;
  transition-delay: 0s !important;
  transition-duration: 0s !important;
  scroll-behavior: auto !important;
}

html,
html:focus-within {
  scroll-behavior: auto !important;
}

.view.view-enter,
.detail-panel-enter > * {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

body[data-motion-status="loading"] .input-card::after,
body[data-motion-status="loading"] .table-shell::after,
body[data-motion-status="loading"] .profile-summary::after,
body[data-motion-status="loading"] #generateBtn::after,
body[data-motion-status="loading"] #refreshBtn::after {
  display: none !important;
}

@keyframes topDownLinear {
  from {
    opacity: 0;
    transform: translate3d(0, -10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes topDownSoft {
  from {
    opacity: 0;
    transform: translate3d(0, -12px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes meterScaleIn {
  from {
    opacity: .45;
    transform: scaleX(.05);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

body[data-mobile-blocked="false"] #priorityList.priority-list .priority-card.priority-card.priority-card {
  animation: topDownSoft 360ms cubic-bezier(.16, 1, .3, 1) both !important;
  animation-delay: calc(min(var(--motion-index, 0), 18) * 34ms) !important;
}

body[data-mobile-blocked="false"] #view-recommend .decision-table tbody tr {
  animation: topDownSoft 430ms cubic-bezier(.16, 1, .3, 1) both !important;
  animation-delay: calc(min(var(--i, 0), 24) * 18ms) !important;
}

body[data-mobile-blocked="false"] #detailPanel.profile-summary .detail-hero,
body[data-mobile-blocked="false"] #detailPanel.profile-summary .summary-grid > div,
body[data-mobile-blocked="false"] #detailPanel.profile-summary .detail-section,
body[data-mobile-blocked="false"] #detailPanel.profile-summary .detail-dismiss {
  animation: topDownLinear 240ms linear both !important;
  animation-delay: calc(min(var(--motion-index, 0), 14) * 34ms) !important;
}

body[data-mobile-blocked="false"] #sourcesBoard.sources-board .source-card.source-card,
body[data-mobile-blocked="false"] #sourcesBoard .source-card.source-card {
  animation: topDownSoft 320ms cubic-bezier(.16, 1, .3, 1) both !important;
  animation-delay: calc(min(var(--motion-index, 0), 14) * 42ms) !important;
}

body[data-mobile-blocked="false"] #profileContent.profile-content .profile-hero,
body[data-mobile-blocked="false"] #profileContent.profile-content .profile-kpis > div,
body[data-mobile-blocked="false"] #profileContent.profile-content .profile-info-card,
body[data-mobile-blocked="false"] #profileContent.profile-content .review-card {
  animation: topDownLinear 240ms linear both !important;
  animation-delay: calc(min(var(--motion-index, 0), 20) * 34ms) !important;
}

body[data-mobile-blocked="false"] .segment-panel .meter i {
  transform-origin: left center !important;
  animation: none !important;
  transition:
    width 680ms cubic-bezier(.16, 1, .3, 1),
    background-color 320ms cubic-bezier(.16, 1, .3, 1) !important;
  will-change: width;
}

@media (hover: hover) and (pointer: fine) {
  body[data-mobile-blocked="false"] .primary-nav.primary-nav.primary-nav::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 7px !important;
    width: var(--nav-w) !important;
    height: calc(100% - 14px) !important;
    border: 1px solid rgba(21, 88, 176, .16) !important;
    border-radius: 999px !important;
    background: rgba(21, 88, 176, .10) !important;
    box-shadow: 0 7px 18px rgba(21, 88, 176, .10) !important;
    opacity: 1 !important;
    pointer-events: none !important;
    transform: translate3d(var(--nav-x), 0, 0) scale(1) !important;
    transform-origin: left center !important;
    transition:
      transform 720ms cubic-bezier(.16, 1, .3, 1),
      width 640ms cubic-bezier(.16, 1, .3, 1),
      background-color 420ms cubic-bezier(.16, 1, .3, 1),
      box-shadow 420ms cubic-bezier(.16, 1, .3, 1) !important;
    will-change: transform, width;
  }

  body[data-mobile-blocked="false"] .primary-nav.primary-nav.primary-nav::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 9px !important;
    width: var(--nav-hover-w) !important;
    height: calc(100% - 18px) !important;
    border: 1px solid rgba(21, 88, 176, .28) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .66) !important;
    box-shadow: 0 5px 14px rgba(21, 88, 176, .08) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate3d(var(--nav-hover-x, var(--nav-x)), 0, 0) scale(.96) !important;
    transform-origin: left center !important;
    transition:
      opacity 180ms cubic-bezier(.16, 1, .3, 1),
      transform 560ms cubic-bezier(.16, 1, .3, 1),
      width 520ms cubic-bezier(.16, 1, .3, 1) !important;
    will-change: opacity, transform, width;
  }

  body[data-mobile-blocked="false"] .primary-nav.nav-hovering.primary-nav.primary-nav::after {
    opacity: 1 !important;
    transform: translate3d(var(--nav-hover-x), 0, 0) scale(1) !important;
  }

  body[data-mobile-blocked="false"] .primary-nav.nav-pressing.primary-nav.primary-nav::before {
    transition:
      transform 520ms cubic-bezier(.16, 1, .3, 1),
      width 480ms cubic-bezier(.16, 1, .3, 1),
      background-color 220ms ease,
      box-shadow 220ms ease !important;
    background: rgba(21, 88, 176, .14) !important;
    box-shadow: 0 8px 20px rgba(21, 88, 176, .12) !important;
  }

  body[data-mobile-blocked="false"] .primary-nav button {
    transition:
      color 140ms ease,
      transform 140ms ease,
      background-color 140ms ease !important;
  }

  body[data-mobile-blocked="false"] .primary-nav button:hover,
  body[data-mobile-blocked="false"] .primary-nav button:focus-visible {
    transform: translate3d(0, -1px, 0) !important;
    color: #1558b0 !important;
  }

  body[data-mobile-blocked="false"] #view-dashboard .insight-panel.wide .priority-card {
    transform: translate3d(0, 0, 0);
    transition:
      background-color 180ms ease,
      border-color 180ms ease,
      box-shadow 180ms ease !important;
  }

  body[data-mobile-blocked="false"] #view-dashboard .insight-panel.wide .priority-card:hover,
  body[data-mobile-blocked="false"] #view-dashboard .insight-panel.wide .priority-card:focus-within {
    transform: none !important;
    border-color: rgba(21, 88, 176, .26) !important;
    background: #f8fbff !important;
    box-shadow: inset 2px 0 0 rgba(21, 88, 176, .32) !important;
  }

  body[data-mobile-blocked="false"] #view-dashboard .insight-panel.wide .row-action {
    transition:
      background-color 120ms ease,
      border-color 120ms ease,
      color 120ms ease !important;
  }

  body[data-mobile-blocked="false"] #view-dashboard .insight-panel.wide .row-action:hover {
    border-color: #1558b0 !important;
    background: #1558b0 !important;
    color: #fff !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-mobile-blocked="false"] #priorityList.priority-list .priority-card.priority-card.priority-card,
  body[data-mobile-blocked="false"] #view-recommend .decision-table tbody tr,
  body[data-mobile-blocked="false"] #detailPanel.profile-summary .detail-hero,
  body[data-mobile-blocked="false"] #detailPanel.profile-summary .summary-grid > div,
  body[data-mobile-blocked="false"] #detailPanel.profile-summary .detail-section,
  body[data-mobile-blocked="false"] #detailPanel.profile-summary .detail-dismiss,
  body[data-mobile-blocked="false"] #sourcesBoard .source-card,
  body[data-mobile-blocked="false"] #profileContent.profile-content .profile-hero,
  body[data-mobile-blocked="false"] #profileContent.profile-content .profile-kpis > div,
  body[data-mobile-blocked="false"] #profileContent.profile-content .profile-info-card,
  body[data-mobile-blocked="false"] #profileContent.profile-content .review-card,
  body[data-mobile-blocked="false"] .segment-panel .meter i {
    animation: none !important;
  }

  body[data-mobile-blocked="false"] .primary-nav.primary-nav.primary-nav::before,
  body[data-mobile-blocked="false"] .primary-nav.primary-nav.primary-nav::after,
  body[data-mobile-blocked="false"] .primary-nav button,
  body[data-mobile-blocked="false"] #view-dashboard .insight-panel.wide,
  body[data-mobile-blocked="false"] #view-dashboard .insight-panel.wide .priority-card,
  body[data-mobile-blocked="false"] #view-dashboard .insight-panel.wide .row-action {
    transition: none !important;
  }

  body[data-mobile-blocked="false"] #view-dashboard .insight-panel.wide:hover,
  body[data-mobile-blocked="false"] #view-dashboard .insight-panel.wide .priority-card:hover {
    transform: none !important;
  }
}

/* Entry flow exception: user-facing first screen and app reveal stay linear. */
html body[data-mobile-blocked="false"][data-score-gate="open"] #scoreGate.score-gate .score-gate-panel.score-gate-panel {
  animation: topDownLinear 240ms linear both !important;
}

html body[data-mobile-blocked="false"][data-score-gate="closed"] .app-topbar.app-topbar.app-topbar {
  animation: topDownLinear 280ms linear both !important;
  animation-delay: 0ms !important;
}

html body[data-mobile-blocked="false"][data-score-gate="closed"] .left-rail.left-rail > .rail-card.rail-card {
  animation: topDownLinear 240ms linear both !important;
  animation-delay: calc(40ms + var(--gate-i, 0) * 34ms) !important;
}

html body[data-mobile-blocked="false"][data-score-gate="closed"] .center-stage.center-stage.center-stage {
  animation: topDownLinear 260ms linear both !important;
  animation-delay: 86ms !important;
}

html body[data-mobile-blocked="false"][data-score-gate="closed"] .right-rail.right-rail.right-rail {
  animation: topDownLinear 260ms linear both !important;
  animation-delay: 120ms !important;
}

html body[data-mobile-blocked="false"] .view.view-enter.view-enter {
  animation: topDownLinear 220ms linear both !important;
}
