/* ViConnects v180 startup shell
   This file is intentionally dependency-free: it protects the first paint even
   while the main application stylesheet, feed JSON and first media are loading.
   Online waiting is deliberately message-free: the structured shell is the UI. */

:root {
  --vc-boot-bg: #020609;
  --vc-boot-panel: #071116;
  --vc-boot-panel-strong: #0a181d;
  --vc-boot-line: rgba(57, 241, 209, .19);
  --vc-boot-accent: #31f1d0;
  --vc-boot-ink: #f5fffd;
  --vc-boot-muted: #91a9ae;
  --vc-boot-safe-bottom: max(0px, env(safe-area-inset-bottom));
}

body.vc-boot-pending {
  overflow: hidden !important;
  overscroll-behavior: none;
}

/* Keep the real shell laid out so images can decode at their final size, but do
   not expose a partially initialized header/feed to sighted or AT users. */
body.vc-boot-pending > :not(#vcBootShell):not(script):not(style):not(noscript) {
  visibility: hidden !important;
}

#vcBootShell {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: block;
  overflow: hidden;
  isolation: isolate;
  color: var(--vc-boot-ink);
  background:
    radial-gradient(circle at 50% -18%, rgba(49, 241, 208, .11), transparent 34%),
    var(--vc-boot-bg);
  opacity: 1;
  visibility: visible;
  transition: opacity .22s ease, visibility .22s ease;
  contain: layout paint style;
}

#vcBootShell.vc-boot-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.vc-boot-canvas {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
}

.vc-boot-sidebar {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px 16px;
  border-right: 1px solid rgba(255, 255, 255, .065);
  background: rgba(0, 2, 4, .82);
}

.vc-boot-brand,
.vc-boot-phone-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vc-boot-brand img,
.vc-boot-phone-brand img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 15px;
  filter: drop-shadow(0 7px 20px rgba(45, 245, 207, .16));
}

.vc-boot-brand b {
  font-size: 15px;
  letter-spacing: -.01em;
}

.vc-boot-side-search,
.vc-boot-side-link,
.vc-boot-shelf > i,
.vc-boot-copy > i,
.vc-boot-copy > b,
.vc-boot-copy > small,
.vc-boot-rail > i,
.vc-boot-media-glow,
.vc-boot-ai,
.vc-boot-nav > i {
  position: relative;
  overflow: hidden;
  background: linear-gradient(110deg, rgba(255, 255, 255, .045) 20%, rgba(49, 241, 208, .12) 44%, rgba(255, 255, 255, .055) 68%);
  background-size: 230% 100%;
  animation: vcBootShimmer 1.55s ease-in-out infinite;
}

.vc-boot-side-search {
  height: 42px;
  margin-top: 2px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
}

.vc-boot-side-links {
  display: grid;
  gap: 11px;
}

.vc-boot-side-link {
  width: 74%;
  height: 18px;
  border-radius: 999px;
}

.vc-boot-side-link:nth-child(2n) { width: 58%; }
.vc-boot-side-link:nth-child(3n) { width: 67%; }

.vc-boot-main {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100%;
  overflow: hidden;
}

.vc-boot-phone {
  position: relative;
  width: min(100%, 1260px);
  height: 100%;
  margin: 0 auto;
}

.vc-boot-header {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(760px, calc(100% - 40px));
  height: 58px;
  padding: 0 12px;
  border: 1px solid rgba(49, 241, 208, .14);
  border-radius: 0 0 21px 21px;
  background: rgba(3, 10, 13, .91);
  transform: translateX(-50%);
}

.vc-boot-phone-brand img { width: 40px; height: 40px; border-radius: 12px; }
.vc-boot-tabs { display: flex; flex: 1; justify-content: center; gap: 30px; }
.vc-boot-tabs i { width: 48px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
.vc-boot-tabs i:first-child { background: var(--vc-boot-accent); box-shadow: 0 0 15px rgba(49, 241, 208, .24); }
.vc-boot-head-dot { width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%; background: rgba(255, 255, 255, .045); }

.vc-boot-shelf {
  position: absolute;
  z-index: 2;
  top: 72px;
  left: 24px;
  right: 24px;
  display: grid;
  grid-template-columns: repeat(8, minmax(90px, 1fr));
  gap: 8px;
  height: 68px;
}

.vc-boot-shelf > i {
  border: 1px solid var(--vc-boot-line);
  border-radius: 12px;
}

.vc-boot-media {
  position: absolute;
  top: 150px;
  bottom: 0;
  left: 50%;
  width: min(530px, 44vw);
  overflow: hidden;
  background: #04080a;
  transform: translateX(-50%);
}

.vc-boot-media-glow {
  position: absolute;
  inset: 0;
  opacity: .68;
  background:
    radial-gradient(circle at 30% 18%, rgba(49, 241, 208, .16), transparent 36%),
    linear-gradient(145deg, #09181d, #030608 62%, #071114);
}

.vc-boot-copy {
  position: absolute;
  z-index: 2;
  left: 20px;
  bottom: calc(96px + var(--vc-boot-safe-bottom));
  display: grid;
  gap: 8px;
  width: min(340px, 68%);
}

.vc-boot-copy > i { width: 142px; height: 17px; border-radius: 999px; }
.vc-boot-copy > b { width: 88%; height: 28px; border-radius: 9px; }
.vc-boot-copy > small { width: 64%; height: 12px; border-radius: 999px; }

.vc-boot-rail {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: calc(92px + var(--vc-boot-safe-bottom));
  display: grid;
  gap: 9px;
}

.vc-boot-rail > i {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
}

.vc-boot-ai {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(16px + var(--vc-boot-safe-bottom));
  width: min(590px, calc(100% - 72px));
  height: 40px;
  border: 1px solid rgba(49, 241, 208, .24);
  border-radius: 999px;
  transform: translateX(-50%);
}

.vc-boot-nav { display: none; }

#vcBootShell .vc-boot-status {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 0;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#vcBootShell .vc-boot-status strong,
#vcBootShell .vc-boot-status p {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

#vcBootShell.vc-boot-confirmed-failure .vc-boot-status {
  gap: 8px;
  width: min(340px, calc(100% - 44px));
  padding: 18px 18px 16px;
  border: 1px solid rgba(49, 241, 208, .18);
  border-radius: 22px;
  background: rgba(2, 9, 12, .9);
  box-shadow: 0 22px 64px rgba(0, 0, 0, .46), inset 0 1px rgba(255, 255, 255, .045);
  pointer-events: auto;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

#vcBootShell.vc-boot-confirmed-failure .vc-boot-status strong,
#vcBootShell.vc-boot-confirmed-failure .vc-boot-status p {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

#vcBootShell.vc-boot-confirmed-failure .vc-boot-status strong { font-size: 15px; line-height: 1.25; }
#vcBootShell.vc-boot-confirmed-failure .vc-boot-status p { color: var(--vc-boot-muted); font-size: 12px; line-height: 1.45; }

.vc-boot-dots { display: flex; gap: 8px; min-height: 12px; }
.vc-boot-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--vc-boot-accent);
  box-shadow: 0 0 18px rgba(49, 241, 208, .55);
  animation: vcBootDot .78s ease-in-out infinite alternate;
}
.vc-boot-dots i + i { animation-delay: .17s; }

.vc-boot-recovery[hidden] { display: none !important; }
.vc-boot-recovery { display: flex; gap: 8px; justify-content: center; width: 100%; margin-top: 4px; }
.vc-boot-recovery button,
.vc-boot-feed-fallback button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(49, 241, 208, .26);
  border-radius: 999px;
  color: var(--vc-boot-ink);
  background: rgba(49, 241, 208, .1);
  font: 700 12px/1 system-ui, sans-serif;
}
.vc-boot-recovery button:first-child { color: #02100d; background: var(--vc-boot-accent); }
.vc-boot-recovery button:focus-visible,
.vc-boot-feed-fallback button:focus-visible { outline: 3px solid rgba(49, 241, 208, .42); outline-offset: 2px; }

/* Confirmed-offline recovery is compact and additive. It never replaces or
   obscures an already initialized header, feed, navigation or cached card. */
.vc-boot-inline-recovery {
  position: fixed;
  z-index: 2147482000;
  left: 50%;
  bottom: calc(86px + var(--vc-boot-safe-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: center;
  width: min(390px, calc(100vw - 28px));
  padding: 11px 12px 11px 15px;
  border: 1px solid rgba(49, 241, 208, .25);
  border-radius: 18px;
  color: var(--vc-boot-ink);
  background: rgba(3, 12, 16, .94);
  box-shadow: 0 14px 42px rgba(0, 0, 0, .42);
  box-sizing: border-box;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.vc-boot-inline-recovery b { grid-column: 1; font: 800 13px/1.2 system-ui, sans-serif; }
.vc-boot-inline-recovery small { grid-column: 1; color: var(--vc-boot-muted); font: 500 11px/1.35 system-ui, sans-serif; }
.vc-boot-inline-recovery button {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 84px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  color: #02100d;
  background: var(--vc-boot-accent);
  font: 800 12px/1 system-ui, sans-serif;
}
.vc-boot-inline-recovery button:focus-visible { outline: 3px solid rgba(49, 241, 208, .42); outline-offset: 2px; }

/* Emergency target used only after the bounded startup deadline. It prevents a
   failed script/network request from ever revealing an unstructured black feed. */
.vc-boot-feed-fallback {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  color: var(--vc-boot-ink);
  background: radial-gradient(circle at 50% 22%, rgba(49, 241, 208, .1), transparent 34%), #020609;
  text-align: center;
}
.vc-boot-feed-fallback > div { display: grid; justify-items: center; gap: 10px; width: min(330px, 86vw); }
.vc-boot-feed-fallback span { width: 38px; height: 38px; border: 1px solid var(--vc-boot-line); border-radius: 50%; background: rgba(49, 241, 208, .1); }
.vc-boot-feed-fallback b { font: 800 17px/1.25 system-ui, sans-serif; }
.vc-boot-feed-fallback small { color: var(--vc-boot-muted); font: 500 12px/1.5 system-ui, sans-serif; }

@keyframes vcBootShimmer {
  0% { background-position: 100% 0; opacity: .72; }
  50% { opacity: 1; }
  100% { background-position: -110% 0; opacity: .72; }
}

@keyframes vcBootDot {
  from { opacity: .38; transform: scale(.72); }
  to { opacity: 1; transform: scale(1.16); }
}

@media (max-width: 1099px) {
  .vc-boot-canvas { display: block; }
  .vc-boot-sidebar { display: none; }
  .vc-boot-main, .vc-boot-phone { width: 100%; }
  .vc-boot-phone { max-width: 520px; }
  .vc-boot-header {
    left: 0;
    width: 100%;
    height: 122px;
    padding: max(10px, env(safe-area-inset-top)) 16px 52px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(2, 7, 10, .99), rgba(2, 8, 11, .92) 76%, rgba(2, 8, 11, .68));
    box-sizing: border-box;
    transform: none;
  }
  .vc-boot-shelf {
    top: 136px;
    left: 0;
    right: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 82px;
    padding: 0 4px;
  }
  .vc-boot-shelf > i:nth-child(n + 5) { display: none; }
  .vc-boot-media { top: 228px; bottom: calc(60px + var(--vc-boot-safe-bottom)); width: 100%; }
  .vc-boot-copy { bottom: calc(86px + var(--vc-boot-safe-bottom)); }
  .vc-boot-rail { right: 5px; bottom: calc(78px + var(--vc-boot-safe-bottom)); gap: 6px; }
  .vc-boot-rail > i { width: 36px; height: 36px; }
  .vc-boot-ai { bottom: calc(68px + var(--vc-boot-safe-bottom)); width: calc(100% - 116px); height: 38px; }
  .vc-boot-nav {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    height: calc(60px + var(--vc-boot-safe-bottom));
    padding: 0 10px var(--vc-boot-safe-bottom);
    border-top: 1px solid rgba(255, 255, 255, .09);
    background: #000;
    box-sizing: border-box;
  }
  .vc-boot-nav > i { justify-self: center; width: 25px; height: 25px; border-radius: 8px; }
  .vc-boot-nav > i:nth-child(3) { width: 55px; height: 38px; border: 1px solid rgba(49, 241, 208, .26); border-radius: 8px; }
  .vc-boot-status { top: 52%; }
}

@media (max-height: 700px) and (max-width: 1099px) {
  .vc-boot-shelf { height: 68px; }
  .vc-boot-media { top: 212px; }
  .vc-boot-status { top: 48%; padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  #vcBootShell { transition: none; }
  .vc-boot-side-search,
  .vc-boot-side-link,
  .vc-boot-shelf > i,
  .vc-boot-copy > i,
  .vc-boot-copy > b,
  .vc-boot-copy > small,
  .vc-boot-rail > i,
  .vc-boot-media-glow,
  .vc-boot-ai,
  .vc-boot-nav > i,
  .vc-boot-dots i { animation: none !important; }
  .vc-boot-dots i + i { opacity: .52; }
}

body.vc-boot-data-saver .vc-boot-side-search,
body.vc-boot-data-saver .vc-boot-side-link,
body.vc-boot-data-saver .vc-boot-shelf > i,
body.vc-boot-data-saver .vc-boot-copy > i,
body.vc-boot-data-saver .vc-boot-copy > b,
body.vc-boot-data-saver .vc-boot-copy > small,
body.vc-boot-data-saver .vc-boot-rail > i,
body.vc-boot-data-saver .vc-boot-media-glow,
body.vc-boot-data-saver .vc-boot-ai,
body.vc-boot-data-saver .vc-boot-nav > i { animation: none !important; }

@media (forced-colors: active) {
  #vcBootShell, .vc-boot-status, .vc-boot-feed-fallback { forced-color-adjust: auto; border: 1px solid CanvasText; }
  .vc-boot-dots i { background: Highlight; box-shadow: none; }
}
