/* Narrow viewport / phone gate: ask users to open Garnet BI full-width on desktop. */
.desktop-only-gate {
  display: none;
}

/* Primary trigger: viewport width. Works on phone AND desktop window resize. */
@media (max-width: 980px) {
  html {
    height: 100%;
  }

  body {
    height: 100% !important;
    min-height: 100dvh !important;
    max-height: none !important;
    overflow: auto !important;
    overflow-x: hidden !important;
  }

  .report-boot-screen,
  .app-header,
  main.shell,
  body > .site-header,
  body > main,
  body > footer {
    display: none !important;
  }

  .desktop-only-gate {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: grid !important;
    place-items: center;
    padding: max(20px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
    overflow: auto;
    background:
      radial-gradient(circle at 12% 8%, rgba(21, 94, 239, .18), transparent 42%),
      radial-gradient(circle at 88% 18%, rgba(113, 71, 232, .14), transparent 38%),
      radial-gradient(circle at 50% 100%, rgba(21, 94, 239, .08), transparent 46%),
      linear-gradient(165deg, #f7f9ff 0%, #eef3fb 48%, #f8faff 100%);
    color: #13233f;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
  }
}

/* JS attribute keeps the same look when set before first paint / for loader early-exit. */
html[data-desktop-only="1"] {
  height: 100%;
}

html[data-desktop-only="1"] body {
  height: 100%;
  min-height: 100dvh;
  max-height: none;
  overflow: auto;
  overflow-x: hidden;
}

html[data-desktop-only="1"] .report-boot-screen,
html[data-desktop-only="1"] .app-header,
html[data-desktop-only="1"] main.shell,
html[data-desktop-only="1"] body > .site-header,
html[data-desktop-only="1"] body > main,
html[data-desktop-only="1"] body > footer {
  display: none !important;
}

html[data-desktop-only="1"] .desktop-only-gate {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
  overflow: auto;
  background:
    radial-gradient(circle at 12% 8%, rgba(21, 94, 239, .18), transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(113, 71, 232, .14), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(21, 94, 239, .08), transparent 46%),
    linear-gradient(165deg, #f7f9ff 0%, #eef3fb 48%, #f8faff 100%);
  color: #13233f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.desktop-only-gate::before,
.desktop-only-gate::after {
  position: absolute;
  width: min(70vw, 340px);
  aspect-ratio: 1;
  border: 1px solid rgba(21, 94, 239, .14);
  border-radius: 50%;
  pointer-events: none;
  content: "";
  animation: desktop-only-orbit 14s linear infinite;
}

.desktop-only-gate::before {
  top: -18vw;
  right: -22vw;
}

.desktop-only-gate::after {
  bottom: -28vw;
  left: -26vw;
  animation-direction: reverse;
  animation-duration: 18s;
}

.desktop-only-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(100%, calc(100dvh - 40px));
  overflow: auto;
  padding: 24px 22px 22px;
  border: 1px solid rgba(201, 216, 241, .92);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .96), rgba(243, 247, 255, .9));
  box-shadow:
    0 28px 70px rgba(26, 58, 110, .14),
    0 2px 8px rgba(26, 58, 110, .04),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  text-align: center;
  animation: desktop-only-rise .7s cubic-bezier(.16, 1, .3, 1) both;
}

.desktop-only-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #155eef;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.desktop-only-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(21, 94, 239, .28);
  overflow: hidden;
}

.desktop-only-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.desktop-only-visual {
  position: relative;
  width: min(180px, 58%);
  margin: 18px auto 4px;
  aspect-ratio: 1.35;
}

.desktop-only-visual svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(21, 94, 239, .18));
  animation: desktop-only-float 4.8s ease-in-out infinite;
}

.desktop-only-card h1 {
  margin: 14px 0 0;
  font-size: clamp(24px, 6.6vw, 32px);
  font-weight: 850;
  letter-spacing: -.045em;
  line-height: 1.12;
  color: #13233f;
}

.desktop-only-card p {
  margin: 10px 0 0;
  color: #62718b;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.desktop-only-steps {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.desktop-only-steps li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(219, 228, 242, .95);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  color: #3e4f6b;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
  animation: desktop-only-rise .65s cubic-bezier(.16, 1, .3, 1) both;
}

.desktop-only-steps li:nth-child(1) { animation-delay: .08s; }
.desktop-only-steps li:nth-child(2) { animation-delay: .16s; }
.desktop-only-steps li:nth-child(3) { animation-delay: .24s; }

.desktop-only-steps b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #e9f0ff;
  color: #155eef;
  font-size: 11px;
  font-weight: 850;
}

.desktop-only-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.desktop-only-copy {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(115deg, #155eef, #3978fa);
  box-shadow: 0 14px 26px rgba(21, 94, 239, .28);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 780;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.desktop-only-copy:active {
  transform: translateY(1px);
  filter: brightness(.98);
}

.desktop-only-copy.is-done {
  background: linear-gradient(115deg, #0f8f66, #2fbf83);
  box-shadow: 0 14px 26px rgba(15, 143, 102, .24);
}

.desktop-only-note {
  margin: 0;
  color: #74829a;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

@keyframes desktop-only-rise {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@keyframes desktop-only-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes desktop-only-orbit {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .desktop-only-card,
  .desktop-only-steps li,
  .desktop-only-visual svg,
  .desktop-only-gate::before,
  .desktop-only-gate::after {
    animation: none !important;
  }
}
