/* Sixth-batch intelligence and global craft layer. */
:root {
  --ip-cyan: #68e8ff;
  --ip-blue: #178bff;
  --ip-indigo: #6758f5;
  --ip-magenta: #e45cff;
  --ip-ink: #131821;
  --ip-hairline: rgba(255, 255, 255, .11);
}

.ip-symbol {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -3px;
}

/* Listening ribbon: the signature sixth-batch interaction. */
.mi-siri {
  grid-template-rows: 58px auto minmax(0, 1fr) auto 54px;
}

.ip-siri-engine {
  width: auto !important;
  height: 22px !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px !important;
  border: 1px solid rgba(104, 232, 255, .14);
  border-radius: 11px !important;
  background: rgba(80, 125, 175, .1) !important;
  color: rgba(218, 238, 255, .65) !important;
  font-size: 8px !important;
}

.ip-siri-engine i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #52d982;
  box-shadow: 0 0 8px rgba(82, 217, 130, .7);
}

.ip-siri-live {
  min-height: 48px;
  display: grid;
  grid-template-columns: 91px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 9px 12px 0;
  padding: 7px 12px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 13px;
  background:
    linear-gradient(120deg, rgba(37, 136, 219, .1), rgba(117, 66, 203, .09)),
    rgba(4, 7, 13, .24);
  color: rgba(232, 238, 247, .76);
  transition: border-color .2s, background .25s, box-shadow .25s;
}

.ip-siri-live.active {
  border-color: rgba(104, 232, 255, .32);
  background:
    radial-gradient(circle at 12% 50%, rgba(104, 232, 255, .16), transparent 38%),
    linear-gradient(120deg, rgba(23, 139, 255, .13), rgba(228, 92, 255, .12)),
    rgba(4, 7, 13, .3);
  box-shadow: 0 0 0 3px rgba(54, 155, 255, .06), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.ip-siri-live > div:last-child {
  min-width: 0;
  display: grid;
}

.ip-siri-live b {
  font-size: 10px;
}

.ip-siri-live span {
  overflow: hidden;
  margin-top: 3px;
  color: rgba(191, 199, 212, .55);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
}

.ip-siri-wave {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.ip-siri-wave i {
  width: 3px;
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--ip-cyan), var(--ip-indigo) 62%, var(--ip-magenta));
  opacity: .36;
  transform-origin: center;
}

.ip-siri-live.active .ip-siri-wave i {
  animation: ip-wave .76s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -67ms);
  opacity: .95;
}

.ip-siri-live.processing .ip-siri-wave i {
  animation-duration: 1.45s;
}

@keyframes ip-wave {
  0% { height: 4px; filter: brightness(.8); }
  100% { height: calc(9px + (var(--i) % 4) * 4px); filter: brightness(1.28); }
}

#mi-siri-mic .ip-symbol,
#mi-siri-speech .ip-symbol {
  vertical-align: middle;
}

#mi-siri-mic.listening {
  background: linear-gradient(135deg, #ff3c70, #d64ee9);
}

/* Spotlight live index */
.spotlight-panel {
  position: relative;
  overflow: hidden;
}

.spotlight-search > .ip-symbol {
  margin: 0 9px 0 3px;
  color: rgba(255, 255, 255, .62);
}

.ip-index-strip {
  height: 31px;
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  background: linear-gradient(90deg, rgba(23, 139, 255, .055), rgba(103, 88, 245, .035));
  color: rgba(222, 229, 238, .68);
}

.ip-index-pulse {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .055);
  color: #7ebfff;
}

.ip-index-strip[data-status="indexing"] .ip-index-pulse,
.ip-index-strip[data-status="searching"] .ip-index-pulse {
  animation: ip-index-pulse 1.25s ease-in-out infinite;
}

@keyframes ip-index-pulse {
  50% { color: var(--ip-cyan); box-shadow: 0 0 0 4px rgba(75, 178, 255, .08); }
}

.ip-index-strip > span:nth-child(2) {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.ip-index-strip b {
  font-size: 8px;
  white-space: nowrap;
}

.ip-index-strip small {
  overflow: hidden;
  color: rgba(179, 188, 201, .42);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 7px;
}

.ip-index-strip > button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: rgba(213, 221, 232, .44);
}

.ip-index-strip > button:hover {
  background: rgba(255, 255, 255, .08);
  color: white;
}

.spotlight-result .ip-index-result-icon {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(102, 205, 255, .95), rgba(34, 126, 225, .95));
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

.spotlight-result .app-file .ip-index-result-icon {
  background: linear-gradient(145deg, rgba(244, 247, 251, .96), rgba(169, 183, 199, .96));
  color: #526171;
}

.ip-file-meta {
  width: min(240px, 86%);
  display: grid;
  gap: 0;
  margin-top: 17px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.ip-file-meta > span {
  min-width: 0;
  min-height: 31px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
  text-align: left;
}

.ip-file-meta b {
  color: rgba(224, 229, 237, .62);
  font-size: 8px;
}

.ip-file-meta small {
  overflow: hidden;
  color: rgba(179, 187, 199, .42);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 7px;
}

/* Global craft pass: focus depth, retained-color glass and tactile press states. */
.window.active {
  box-shadow:
    0 34px 100px rgba(0, 0, 0, .5),
    0 0 0 .5px rgba(209, 235, 255, .3),
    0 1px 0 rgba(255, 255, 255, .21) inset,
    0 -1px 0 rgba(83, 138, 190, .08) inset;
}

.window:not(.active):not(.dragging) {
  box-shadow:
    0 17px 48px rgba(0, 0, 0, .3),
    0 0 0 .5px rgba(255, 255, 255, .08),
    0 1px 0 rgba(255, 255, 255, .12) inset;
}

.dock.liquid,
.menu-pop.liquid,
.control-center.liquid,
.notification-center.liquid,
.spotlight-panel.liquid {
  background-image:
    linear-gradient(155deg, rgba(255, 255, 255, .105), rgba(255, 255, 255, .012) 38%, rgba(66, 132, 190, .055)),
    radial-gradient(circle at 20% -20%, rgba(126, 205, 255, .1), transparent 46%);
  border-color: rgba(229, 244, 255, .16);
  backdrop-filter: blur(34px) saturate(178%) brightness(.94);
  -webkit-backdrop-filter: blur(34px) saturate(178%) brightness(.94);
}

button.ip-pressed:not(.mission-space-btn):not(.mission-window) {
  filter: brightness(.84) saturate(1.08);
  transition-duration: 60ms !important;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(66, 164, 255, .92);
  outline-offset: 2px;
}

.dock-item:active .dock-icon {
  transform: translateY(2px) scale(.91);
  filter: brightness(.88);
}

@media (prefers-reduced-motion: reduce) {
  .ip-siri-live.active .ip-siri-wave i,
  .ip-index-strip[data-status="indexing"] .ip-index-pulse,
  .ip-index-strip[data-status="searching"] .ip-index-pulse {
    animation: none !important;
  }
}
