/* Onyx Command Guide — extends the Nexus/Onyx design system (nexus.css) */

/* ---- hero ---- */
.guide-hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 1rem 1.75rem;
}
.guide-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(11, 142, 201, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 142, 201, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, black 20%, transparent 78%);
  pointer-events: none;
}
.guide-hero::after {
  content: "";
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 120%);
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(11, 142, 201, 0.12), transparent 65%);
  pointer-events: none;
}
.guide-hero__inner {
  position: relative;
  z-index: 2;
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
  text-align: center;
}
.guide-hero__eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nx-accent);
  margin: 0 0 0.35rem;
}
.guide-hero__title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.5rem, 8vw, 4.25rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
}
.guide-hero__tagline {
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  color: var(--nx-ink-2);
  max-width: 40rem;
  margin: 0.9rem auto 0;
  line-height: 1.5;
}
.guide-hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

/* ---- search ---- */
.guide-search-wrap {
  position: relative;
  max-width: 540px;
  margin: 1.5rem auto 0;
}
.guide-search-wrap svg {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--nx-ink-3);
  pointer-events: none;
}
.guide-search {
  width: 100%;
  padding: 0.85rem 2.5rem 0.85rem 2.8rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  color: var(--nx-ink);
  background: var(--nx-panel);
  border: 1px solid var(--nx-line-2);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.guide-search::placeholder { color: var(--nx-ink-3); }
.guide-search:focus {
  outline: none;
  border-color: var(--nx-accent);
  box-shadow: 0 0 0 3px var(--nx-accent-line);
}
.guide-search-clear {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 7px;
  background: var(--nx-bg-2);
  color: var(--nx-ink-3);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.guide-search-clear:hover { color: var(--nx-accent); }
.guide-search-wrap.has-text .guide-search-clear { display: flex; }

/* ---- sticky category bar ---- */
.guide-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: color-mix(in srgb, var(--nx-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nx-line);
}
.guide-bar__inner {
  width: min(1100px, 100%);
  margin-inline: auto;
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.6rem 1rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.guide-bar__inner::-webkit-scrollbar { display: none; }
.guide-cat-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  color: var(--nx-ink-2);
  background: var(--nx-bg-2);
  border: 1px solid var(--nx-line-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.guide-cat-chip:hover { border-color: var(--nx-accent); color: var(--nx-accent); }
.guide-cat-chip.active {
  background: var(--nx-accent);
  color: #fff;
  border-color: var(--nx-accent);
}
.guide-cat-chip b { font-weight: 600; opacity: 0.6; }
.guide-cat-chip.active b { opacity: 0.85; }

/* ---- category sections ---- */
.guide-body { padding-bottom: 3rem; }
.guide-cat {
  padding: 2.25rem 1rem 0.5rem;
  scroll-margin-top: calc(var(--header-h) + 54px);
}
.guide-cat__container { width: min(1100px, 100% - 2rem); margin-inline: auto; }
.guide-cat__head {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--nx-line);
}
.guide-cat__emoji { font-size: 1.3rem; line-height: 1; }
.guide-cat__name {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--nx-ink);
}
.guide-cat__count {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--nx-ink-3);
  border: 1px solid var(--nx-line-2);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
}

/* ---- command cards ---- */
.cmd-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.cmd {
  background: var(--nx-panel);
  border: 1px solid var(--nx-line);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.05rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.cmd:hover {
  border-color: var(--nx-accent-line);
  box-shadow: 0 10px 24px -16px rgba(11, 142, 201, 0.4);
  transform: translateY(-1px);
}
.cmd__head { display: flex; align-items: flex-start; gap: 0.5rem; }
.cmd__name {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--nx-accent);
  line-height: 1.45;
  word-break: break-word;
}
.cmd__name .arg { color: var(--nx-ink-3); font-weight: 400; }
.cmd__copy {
  margin-left: auto;
  flex: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--nx-ink-3);
  background: var(--nx-bg-2);
  border: 1px solid var(--nx-line-2);
  border-radius: 7px;
  padding: 0.28rem 0.5rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.cmd__copy:hover { color: var(--nx-accent); border-color: var(--nx-accent); }
.cmd__copy.copied { color: #fff; background: var(--nx-accent); border-color: var(--nx-accent); }
.cmd__desc {
  margin: 0.6rem 0 0;
  font-size: 0.875rem;
  color: var(--nx-ink-2);
  line-height: 1.55;
}
.cmd__ex {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.cmd__ex-label {
  width: 100%;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nx-ink-3);
  margin-bottom: 0.15rem;
}
.cmd__ex code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--nx-ink-2);
  background: var(--nx-bg-2);
  border: 1px solid var(--nx-line);
  border-radius: 6px;
  padding: 0.22rem 0.48rem;
}

/* ---- empty state ---- */
.guide-empty {
  display: none;
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--nx-ink-3);
}
.guide-empty.show { display: block; }
.guide-empty strong { color: var(--nx-ink); font-family: "Fraunces", Georgia, serif; font-weight: 500; }

/* ---- intro note + back-to-store link ---- */
.guide-note {
  width: min(1100px, 100% - 2rem);
  margin: 1.25rem auto 0;
  padding: 0.9rem 1.1rem;
  background: radial-gradient(140% 90% at 0% 0%, rgba(11, 142, 201, 0.08), transparent 55%), var(--nx-panel);
  border: 1px solid var(--nx-accent-line);
  border-radius: 14px;
  font-size: 0.875rem;
  color: var(--nx-ink-2);
  line-height: 1.55;
}
.guide-note b { color: var(--nx-ink); }
.guide-note a { color: var(--nx-accent); font-weight: 600; text-decoration: none; }
.guide-note a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .cmd-grid { grid-template-columns: 1fr; }
}
