/* Shared jump menu, skip link, and screen-reader utilities. */

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 30;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  background: #14241c;
  color: #fbfaf4;
  font: 600 0.875rem/1.2 Inter, "Segoe UI", sans-serif;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
  outline: 2px solid #a6843d;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.command-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 0 1 22rem;
  width: 100%;
  max-width: 22rem;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0.55rem 0.4rem 0.75rem;
  border: 1px solid rgba(20, 36, 28, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #556058;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.command-trigger:hover {
  border-color: rgba(20, 36, 28, 0.35);
  background: #fff;
  color: #14241c;
}

.command-trigger:focus-visible {
  outline: 2px solid #a6843d;
  outline-offset: 2px;
}

.command-trigger-short {
  display: none;
}

.command-trigger kbd {
  flex: 0 0 auto;
  padding: 0.08rem 0.4rem;
  border: 1px solid #d4d2c4;
  border-radius: 4px;
  background: #f2efe6;
  color: #556058;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.command-palette {
  width: min(32rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 28rem);
  margin: auto;
  padding: 0;
  border: 1px solid #d4d2c4;
  border-radius: 12px;
  background: #fff;
  color: #14241c;
  box-shadow: 0 24px 60px rgba(20, 36, 28, 0.18);
}

.command-palette::backdrop {
  background: rgba(20, 36, 28, 0.45);
}

.command-palette:focus-within {
  outline: none;
  box-shadow: 0 24px 60px rgba(20, 36, 28, 0.18), 0 0 0 3px rgba(166, 132, 61, 0.35);
}

.command-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.9rem 1rem;
  border: none;
  border-bottom: 1px solid #e3e1d4;
  border-radius: 12px 12px 0 0;
  background: #fff;
  color: #14241c;
  font: inherit;
  font-size: 1rem;
}

.command-input:focus {
  outline: none;
}

.command-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  max-height: 18rem;
  overflow: auto;
}

.command-option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
}

.command-option[aria-selected="true"] {
  background: #f2efe6;
}

.command-option-label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.command-option-group {
  flex: 0 0 auto;
  color: #556058;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.command-empty {
  margin: 0;
  padding: 0.9rem 1rem 1.05rem;
  color: #556058;
  font-size: 0.875rem;
}

@media (max-width: 720px) {
  .command-trigger kbd,
  .command-trigger-label {
    display: none;
  }

  .command-trigger-short {
    display: inline;
  }

  .command-trigger {
    flex: 0 1 auto;
    width: auto;
    max-width: none;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition: none;
  }
}
