/* V22 — Advanced UX / Navigation / Conversion Architecture */

:root {
  --tm-focus: #0b57d0;
  --tm-surface: #fff;
  --tm-text: #151515;
  --tm-muted: #666;
  --tm-border: rgba(21,21,21,.12);
  --tm-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.tm-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  transform-origin: left center;
  transform: scaleX(0);
  background: currentColor;
  z-index: 10000;
  pointer-events: none;
}

.tm-context-nav {
  position: sticky;
  bottom: 0;
  z-index: 100;
  display: none;
  gap: .5rem;
  padding: .55rem .75rem;
  border-top: 1px solid var(--tm-border);
  background: color-mix(in srgb, var(--tm-surface) 94%, transparent);
  backdrop-filter: blur(14px);
}

.tm-context-nav a,
.tm-context-nav button {
  min-height: 44px;
  flex: 1;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: .75rem;
  padding: .5rem .65rem;
  text-decoration: none;
  font-weight: 700;
  font-size: .86rem;
}

.tm-journey {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0,1fr));
}

.tm-journey a {
  position: relative;
  display: block;
  padding: 1rem;
  border: 1px solid var(--tm-border);
  border-radius: 1rem;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.tm-journey a:hover {
  transform: translateY(-2px);
  box-shadow: var(--tm-shadow);
}

.tm-journey-step {
  display: block;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .65;
  margin-bottom: .3rem;
}

.tm-related {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0,1fr));
}

.tm-related a {
  display: block;
  min-height: 44px;
}

.tm-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-block: 1.25rem;
}

.tm-action-bar a,
.tm-action-bar button {
  min-height: 44px;
}

.tm-search-empty {
  padding: 1.25rem;
  border: 1px dashed var(--tm-border);
  border-radius: 1rem;
}

@media (max-width: 800px) {
  .tm-journey { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tm-related { grid-template-columns: 1fr; }
  .tm-context-nav { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  .tm-journey a { transition: none; }
}
