.talia-speed-shell[hidden] {
  display: none !important;
}

.talia-speed-shell {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  grid-template-columns: minmax(196px, 15vw) 1fr;
  overflow: hidden;
  box-sizing: border-box;
  background: #f7f7fa;
  pointer-events: none;
  contain: strict;
  opacity: 0;
}

.talia-speed-shell.is-visible {
  opacity: 1;
}

.talia-speed-shell,
.talia-speed-shell * {
  box-sizing: border-box;
}

.talia-speed-shell__rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 28px 22px;
  background: #2f2851;
}

.talia-speed-shell__brand,
.talia-speed-shell__rail-line,
.talia-speed-shell__top-line,
.talia-speed-shell__heading,
.talia-speed-shell__subheading,
.talia-speed-shell__card-line,
.talia-speed-shell__panel-line {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e6ed;
}

.talia-speed-shell__brand {
  width: 72%;
  height: 22px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.talia-speed-shell__rail-line {
  width: 86%;
  height: 12px;
  background: rgba(255, 255, 255, 0.17);
}

.talia-speed-shell__rail-line:nth-child(3n) {
  width: 62%;
}

.talia-speed-shell__main {
  min-width: 0;
}

.talia-speed-shell__top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid #e4e3e9;
  background: #fff;
}

.talia-speed-shell__top-line {
  width: 84px;
  height: 11px;
}

.talia-speed-shell__top-line--wide {
  width: 146px;
}

.talia-speed-shell__surface {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) 0;
}

.talia-speed-shell__heading {
  width: min(360px, 62%);
  height: 28px;
  background: #d8d6e2;
}

.talia-speed-shell__subheading {
  width: min(520px, 82%);
  height: 12px;
  margin-top: 16px;
}

.talia-speed-shell__cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 38px;
}

.talia-speed-shell__card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 120px;
  padding: 24px;
  border: 1px solid #e5e4eb;
  border-radius: 16px;
  background: #fff;
}

.talia-speed-shell__card-line {
  width: 76%;
  height: 20px;
}

.talia-speed-shell__card-line--short {
  width: 42%;
  height: 10px;
}

.talia-speed-shell__panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 24px;
  padding: 30px;
  border: 1px solid #e5e4eb;
  border-radius: 16px;
  background: #fff;
}

.talia-speed-shell__panel-line {
  width: 100%;
  height: 12px;
}

.talia-speed-shell__panel-line:nth-child(2n) {
  width: 88%;
}

.talia-speed-shell.is-visible .talia-speed-shell__heading,
.talia-speed-shell.is-visible .talia-speed-shell__subheading,
.talia-speed-shell.is-visible .talia-speed-shell__card-line,
.talia-speed-shell.is-visible .talia-speed-shell__panel-line {
  background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  background-size: 240% 100%;
  animation: talia-speed-shell-pulse 1.35s ease-in-out infinite;
}

@keyframes talia-speed-shell-pulse {
  from { background-position: 130% 0; }
  to { background-position: -130% 0; }
}

.talia-device-cache-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483100;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: #30235a;
  color: #fff;
  font: 600 14px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 14px 38px rgba(30, 20, 62, 0.3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.talia-device-cache-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.talia-device-cache-clear {
  display: none;
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 2147482000;
  appearance: none;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: #30235a;
  color: #fff;
  font: 600 11px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(30, 20, 62, 0.22);
  cursor: pointer;
  opacity: 0.68;
}

.talia-device-cache-ready .talia-device-cache-clear {
  display: block;
}

#wpadminbar .talia-device-cache-clear-control {
  display: none;
}

.talia-device-cache-ready #wpadminbar .talia-device-cache-clear-control {
  display: list-item;
}

.talia-device-cache-clear:hover,
.talia-device-cache-clear:focus-visible {
  opacity: 1;
  background: #493486;
}

.talia-device-cache-clear:focus-visible {
  outline: 3px solid #c8b7ff;
  outline-offset: 2px;
}

.talia-device-cache-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  .talia-device-cache-toast { transition: none; }
  .talia-speed-shell.is-visible .talia-speed-shell__heading,
  .talia-speed-shell.is-visible .talia-speed-shell__subheading,
  .talia-speed-shell.is-visible .talia-speed-shell__card-line,
  .talia-speed-shell.is-visible .talia-speed-shell__panel-line { animation: none; }
}

@media (max-width: 760px) {
  .talia-speed-shell {
    grid-template-columns: 64px 1fr;
  }

  .talia-speed-shell__rail {
    padding: 24px 14px;
  }

  .talia-speed-shell__brand,
  .talia-speed-shell__rail-line {
    width: 100%;
  }

  .talia-speed-shell__top {
    height: 58px;
    padding: 0 18px;
  }

  .talia-speed-shell__top-line--wide {
    display: none;
  }

  .talia-speed-shell__surface {
    width: calc(100% - 28px);
    padding-top: 28px;
  }

  .talia-speed-shell__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
  }

  .talia-speed-shell__card {
    min-height: 94px;
    padding: 18px;
  }

  .talia-speed-shell__panel {
    gap: 18px;
    padding: 22px;
  }

  .talia-device-cache-clear {
    left: 8px;
    bottom: 8px;
    padding: 6px 9px;
  }
}
