/* Karify — journey nav (task-based primary nav) + All-tools overlay.
   Replaces the 4 category tabs with 6 journeys + "All tools". Uses shared
   tokens; one nav for desktop + mobile (the duplicate bottom-nav is gone). */

/* ---- Primary journey nav ---- */
.journey-tabs {
  display: flex;
  gap: var(--space-2, 8px);
  margin-top: var(--space-6, 24px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.journey-tabs::-webkit-scrollbar { display: none; }

.journey-pill {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--duration-fast, .15s) var(--ease-out, ease),
              color var(--duration-fast, .15s) var(--ease-out, ease),
              border-color var(--duration-fast, .15s) var(--ease-out, ease),
              box-shadow var(--duration-fast, .15s) var(--ease-out, ease);
}
.journey-pill:hover { color: var(--text); border-color: var(--border-bright); }
.journey-pill.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
  font-weight: 650;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 32%, transparent);
}

/* "All tools" — visually secondary (outline, pushed to the end). */
.journey-pill--tools {
  margin-left: auto;
  border-style: dashed;
  color: var(--text-dim, var(--text-muted));
}
.journey-pill--tools.active {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  border-style: solid;
  box-shadow: none;
}
@media (max-width: 640px) {
  .journey-pill--tools { margin-left: var(--space-2, 8px); }  /* no auto-push when scrolling */
}

/* ---- All tools overlay ---- */
.alltools-backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 12, 22, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-fast, .15s) var(--ease-out, ease);
  z-index: 900;
}
.alltools-backdrop.open { opacity: 1; pointer-events: auto; }

.alltools-overlay {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -48%) scale(.98);
  width: min(560px, calc(100vw - 32px));
  max-height: min(80vh, 640px);
  display: flex; flex-direction: column;
  background: var(--bg-elevated, var(--surface));
  border: 1px solid var(--border-bright, var(--border));
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow-drawer, 0 24px 60px rgba(0,0,0,.4));
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-fast, .15s) var(--ease-out, ease),
              transform var(--duration-fast, .15s) var(--ease-out, ease);
  z-index: 901;
}
.alltools-overlay.open {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.alltools-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.alltools-title { font-size: var(--text-lg, 1.1rem); font-weight: 700; color: var(--text); margin: 0; }

.alltools-list {
  overflow-y: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 480px) { .alltools-list { grid-template-columns: 1fr; } }

.alltools-item {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 550;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: border-color var(--duration-fast, .15s) var(--ease-out, ease),
              background var(--duration-fast, .15s) var(--ease-out, ease);
}
.alltools-item:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .alltools-overlay, .alltools-backdrop { transition: none; }
}
