/* Search keeps its capsule layout and uses the shared Finder material. */
.spotlight-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  margin: 0 5px 0 0;
  padding: 5px;
  border: 0;
  border-radius: 6px;
  color: var(--os-text, #ddd);
  background: transparent;
}
.spotlight-trigger svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; }
.spotlight-trigger:hover { background: var(--os-hover); }
.spotlight-trigger:focus-visible { outline: 2px solid var(--os-focus, #94bcff); outline-offset: -2px; }

#spotlight {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--os-text, #ddd);
  background: transparent;
  font: 13px/1.35 var(--os-font, Arial, "Helvetica Neue", Helvetica, sans-serif);
  -webkit-font-smoothing: antialiased;
}
#spotlight::backdrop { background: transparent; }
#spotlight *, #spotlight *::before, #spotlight *::after { box-sizing: border-box; }
#spotlight [hidden] { display: none !important; }
.spotlight-stage {
  --spotlight-size: 60px;
  --spotlight-gap: 10px;
  --spotlight-shortcut-span: calc(4 * (var(--spotlight-size) + var(--spotlight-gap)));
  --spotlight-radius: calc(var(--spotlight-size) / 2);
  --spotlight-material: var(--os-menu-surface, #181818e8);
  --spotlight-blur: blur(var(--os-glass-blur, 28px)) saturate(130%);
  --spotlight-start-top: clamp(70px, 17vh, 172px);
  --spotlight-width: min(680px, calc(100% - 40px));
  --spotlight-half-width: calc(var(--spotlight-width) / 2);
  --spotlight-body-room: min(120px, 25vh);
  --spotlight-top: clamp(calc(var(--os-menu-height, 38px) + 8px), var(--spotlight-y, var(--spotlight-start-top)), calc(100% - var(--spotlight-size) - var(--spotlight-body-room) - 16px));
  position: absolute;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - var(--spotlight-top) - 16px);
  top: var(--spotlight-top);
  left: clamp(calc(var(--spotlight-half-width) + 8px), var(--spotlight-x, 50%), calc(100% - var(--spotlight-half-width) - 8px));
  width: var(--spotlight-width);
  transform: translateX(-50%);
  transition: width 240ms cubic-bezier(.2, .8, .3, 1), left 200ms cubic-bezier(.2, .8, .3, 1);
}
.spotlight-stage.is-dragging { transition: none; }
#spotlight .spotlight-field { cursor: grab; }
#spotlight .spotlight-stage.is-dragging .spotlight-field { cursor: grabbing; }
.spotlight-stage.is-browsing { --spotlight-material: var(--os-surface-raised, #272828); }
.spotlight-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: calc(100% - var(--spotlight-shortcut-span));
  transition: width 240ms cubic-bezier(.2, .8, .3, 1);
}
.spotlight-stage.has-results .spotlight-shell { width: 100%; }
.spotlight-shortcuts {
  position: absolute;
  inset: 0 0 auto;
  height: var(--spotlight-size);
  z-index: 0;
  pointer-events: none;
}
.spotlight-glass,
.spotlight-shell::before {
  border: 1px solid var(--os-frame, #54565e);
  border-top-color: var(--os-frame-top, #576775);
  background: var(--spotlight-material);
  box-shadow: var(--os-glass-rim), var(--os-shadow);
  -webkit-backdrop-filter: var(--spotlight-blur);
  backdrop-filter: var(--spotlight-blur);
}
/* One material grows from the original capsule into the entire results shell.
   Content never paints a second blur, tinted background, border or shadow. */
.spotlight-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: var(--spotlight-radius);
  pointer-events: none;
}
.spotlight-field {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  flex: none;
  height: var(--spotlight-size);
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: var(--spotlight-radius);
  touch-action: none;
}
.spotlight-stage.is-browsing .spotlight-search-icon { display: none; }
.spotlight-back {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  margin: 0 6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--os-text, #ddd);
}
.spotlight-back:hover { background: var(--os-hover, #ffffff14); }
.spotlight-back svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.spotlight-search-icon {
  pointer-events: none;
  flex: none;
  width: 25px;
  height: 25px;
  margin-right: 11px;
  color: var(--os-muted, #939393);
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
#spotlight-search {
  display: block;
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 70%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  color: var(--os-text, #ddd);
  background: transparent;
  font: 400 24px/1.2 var(--os-font, Arial, "Helvetica Neue", Helvetica, sans-serif);
  letter-spacing: -.55px;
  caret-color: var(--os-focus, #94bcff);
  cursor: text;
  appearance: none;
  -webkit-appearance: none;
}
#spotlight-search::placeholder { color: var(--os-muted, #939393); opacity: 1; }
#spotlight-search::-webkit-search-cancel-button { display: none; }
.spotlight-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--os-field);
  color: var(--os-text, #ddd);
}
.spotlight-clear svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.spotlight-options { position: relative; flex: none; margin-left: 8px; }
#spotlight .spotlight-options summary {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--os-muted, #939393);
  cursor: pointer;
  list-style: none;
}
.spotlight-options summary::-webkit-details-marker { display: none; }
.spotlight-options summary:hover { background: var(--os-hover, #ffffff14); color: var(--os-text, #ddd); }
.spotlight-options summary:focus-visible { outline: 2px solid var(--os-focus, #94bcff); outline-offset: 2px; }
.spotlight-options svg { width: 23px; height: 23px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.spotlight-options-panel {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 154px;
  padding: 4px;
  border: 1px solid var(--os-frame, #54565e);
  border-radius: 8px;
  background: var(--os-surface-raised, #272828);
  box-shadow: var(--os-shadow);
}
.spotlight-options-panel button {
  display: block;
  width: 100%;
  padding: 5px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: nowrap;
}
.spotlight-options-panel button:hover { background: var(--os-hover, #ffffff14); }
.spotlight-category {
  --shortcut-index: 0;
  position: absolute;
  top: 0;
  right: calc((3 - var(--shortcut-index)) * (var(--spotlight-size) + var(--spotlight-gap)));
  z-index: calc(4 - var(--shortcut-index));
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--spotlight-size);
  height: var(--spotlight-size);
  margin: 0;
  padding: 15px;
  border-radius: 50%;
  color: var(--os-muted, #939393);
  --shortcut-delay: calc((3 - var(--shortcut-index)) * 16ms);
  opacity: 1;
  filter: blur(0);
  transform: translateX(0);
  transition: opacity 240ms ease var(--shortcut-delay),
    filter 280ms ease var(--shortcut-delay),
    transform 280ms cubic-bezier(.2, .8, .3, 1) var(--shortcut-delay),
    background-color 100ms ease, color 100ms ease;
}
.spotlight-category:nth-child(2) { --shortcut-index: 1; }
.spotlight-category:nth-child(3) { --shortcut-index: 2; }
.spotlight-category:nth-child(4) { --shortcut-index: 3; }
.spotlight-stage.has-results .spotlight-category {
  --shortcut-delay: calc(var(--shortcut-index) * 16ms);
  opacity: 0;
  filter: blur(9px);
  transform: translateX(8px);
  pointer-events: none;
}
.spotlight-category svg { width: 27px; height: 27px; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.spotlight-category:hover { background-color: var(--os-surface-raised, #272828); color: #fff; }
.spotlight-category[aria-pressed="true"] { background-color: var(--os-selection, #0050c0); color: #fff; border-color: var(--os-frame-top, #576775); }
#spotlight button:focus-visible { outline: 2px solid var(--os-focus, #94bcff); outline-offset: 3px; }
.spotlight-panel {
  flex: 0 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  contain: paint;
  margin-top: 0;
  max-height: 510px;
  padding: 8px 9px 9px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--os-line, #3b3b3bcc);
  border-radius: 0 0 var(--spotlight-radius) var(--spotlight-radius);
  animation: spotlight-appear 130ms cubic-bezier(.2, .8, .3, 1);
}
.spotlight-browse {
  display: flex;
  align-items: center;
  flex: none;
  gap: 6px;
  margin: 0 18px;
  padding: 8px 0;
  border-top: 1px solid var(--os-line, #3b3b3bcc);
}
.spotlight-browse button {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 6px;
  border: 0;
  border-radius: 7px;
  background: var(--os-field, #ffffff0a);
  color: var(--os-text, #ddd);
  font: inherit;
}
.spotlight-browse button:is(:hover, [aria-pressed="true"]) { background: var(--os-hover, #ffffff14); }
.spotlight-browse button[aria-pressed="true"] { color: #fff; box-shadow: inset 0 0 0 1px var(--os-frame, #54565e); }
#spotlight-results { min-width: 0; max-width: 100%; }
.spotlight-group-title {
  margin: 0;
  padding: 9px 13px 5px;
  color: var(--os-muted, #939393);
  font: 600 11px/1.4 var(--os-font, Arial, "Helvetica Neue", Helvetica, sans-serif);
}
.spotlight-result {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 59px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--os-text, #ddd);
  text-decoration: none;
  outline: none;
}
.spotlight-result[aria-selected="true"] {
  border-color: transparent;
  background: var(--os-selection, #0050c0);
  color: #fff;
}
.spotlight-result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 34px;
  color: #edd28d;
}
.spotlight-result-icon svg { width: 29px; height: 31px; }
.spotlight-result[data-kind="talk"] .spotlight-result-icon { color: #ccb8ff; }
.spotlight-result[data-kind="reference"] .spotlight-result-icon { color: #b0d8ff; }
.spotlight-result:is([data-kind="page"], [data-kind="contact"]) .spotlight-result-icon { color: var(--os-text, #ddd); }
.spotlight-result-copy { min-width: 0; flex: 1; }
.spotlight-result-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.1px;
}
.spotlight-result-summary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  color: var(--os-muted, #939393);
  font-size: 11px;
  line-height: 1.35;
}
.spotlight-result[aria-selected="true"] .spotlight-result-summary { color: #fff; }
.spotlight-result-kind { flex: none; padding-left: 5px; color: var(--os-muted, #939393); font-size: 11px; }
.spotlight-result[aria-selected="true"] .spotlight-result-kind { color: #fff; }
.spotlight-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 6px 4px 10px;
}
.spotlight-group-title + .spotlight-tiles { margin-bottom: 4px; border-bottom: 1px solid var(--os-line, #3b3b3bcc); }
.spotlight-tiles .spotlight-result {
  flex-direction: column;
  justify-content: flex-start;
  gap: 7px;
  padding: 10px 6px;
  text-align: center;
}
.spotlight-tiles .spotlight-result-icon { width: 52px; height: 52px; border-radius: 12px; background: var(--os-field, #ffffff0a); }
.spotlight-tiles .spotlight-result-icon svg { width: 35px; height: 38px; }
.spotlight-tiles .spotlight-result-copy { width: 100%; }
.spotlight-tiles .spotlight-result-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
}
.spotlight-tiles :is(.spotlight-result-summary, .spotlight-result-kind) { display: none; }
.spotlight-message { padding: 30px 18px; color: var(--os-text, #ddd); text-align: center; font-size: 14px; }
.spotlight-retry { display: block; margin: 16px auto 0; padding: 6px 16px; border: 1px solid var(--os-frame, #54565e); border-radius: var(--os-inner-radius, 8px); background: var(--os-surface-raised, #272828); color: var(--os-text, #ddd); font: inherit; }
@keyframes spotlight-appear { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) {
  .spotlight-stage { --spotlight-size: 42px; --spotlight-gap: 6px; --spotlight-start-top: max(65px, env(safe-area-inset-top)); --spotlight-width: calc(100% - 24px); }
  .spotlight-field { padding: 0 12px; }
  .spotlight-search-icon { width: 19px; height: 19px; margin-right: 7px; }
  #spotlight-search { font-size: 17px; letter-spacing: -.3px; }
  .spotlight-category { padding: 9px; }
  .spotlight-category svg { width: 23px; height: 23px; }
  .spotlight-clear { width: 17px; height: 17px; margin-left: 4px; }
  .spotlight-panel { padding: 5px 6px 6px; }
  .spotlight-result { gap: 7px; padding: 8px; }
  .spotlight-result-kind { display: none; }
  .spotlight-result-title { font-size: 12px; }
  .spotlight-tiles .spotlight-result-icon { width: 42px; height: 42px; }
  .spotlight-tiles .spotlight-result-icon svg { width: 28px; height: 30px; }
  .spotlight-browse { margin-inline: 10px; }
}
@media (max-width: 480px) {
  .spotlight-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .spotlight-stage { --spotlight-size: 38px; --spotlight-gap: 4px; }
  #spotlight-search { font-size: 14px; }
  .spotlight-field { padding: 0 7px; }
  .spotlight-search-icon { width: 17px; height: 17px; margin-right: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .spotlight-panel { animation: none; }
  .spotlight-stage, .spotlight-shell, .spotlight-category { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .spotlight-stage { --spotlight-material: var(--os-surface, #181818); --spotlight-blur: none; }
}
