/* UX-001 — the server-rendered three-minute judge path. */

.judge-journey {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: 100%;
  max-inline-size: 100%;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  overflow: hidden;
  border: 3px solid var(--neo-ink);
  border-radius: var(--neo-radius-card);
  background: var(--neo-paper);
  box-shadow: var(--neo-shadow-sm);
}

.judge-journey-label {
  display: grid;
  place-items: center;
  min-width: 7.5rem;
  padding: 0.65rem 0.9rem;
  background: var(--neo-ink);
  color: #fff;
  font-family: var(--neo-font-mono);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.judge-journey ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.judge-journey li {
  min-width: 0;
}

.judge-journey li + li {
  border-left: 2px solid var(--neo-ink);
}

.judge-journey a {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.8rem;
  color: var(--neo-ink);
  text-decoration: none;
}

.judge-journey a:hover {
  background: var(--neo-yellow);
}

.judge-journey a.is-active {
  background: var(--neo-purple);
  color: #fff;
}

.judge-journey a > span {
  flex: 0 0 auto;
  font-family: var(--neo-font-mono);
  font-size: 0.65rem;
  font-weight: 950;
}

.judge-journey a > strong {
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.15;
}

.demo-entry {
  flex: 1 1 32rem;
  display: grid;
  gap: 0.45rem;
  max-width: 38rem;
}

.demo-entry-label {
  width: max-content;
  max-width: 100%;
  border: 2px solid var(--neo-ink);
  border-radius: 999px;
  background: var(--neo-paper);
  font-family: var(--neo-font-mono);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.65rem;
}

.demo-entry .button {
  width: 100%;
  min-height: 64px;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
  white-space: normal;
}

.demo-entry .button strong {
  font-size: 1rem;
}

.demo-entry .button small {
  color: currentColor;
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.35;
}

.demo-entry > p {
  max-width: 36rem;
  margin: 0;
  color: #403c33;
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-journey-actions {
  display: grid;
  gap: 0.75rem;
  min-width: min(100%, 14rem);
}

.profile-journey-actions .button {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.profile-truth-boundary {
  display: grid;
  justify-items: end;
  gap: 0.55rem;
  max-width: 30rem;
  text-align: right;
}

.profile-truth-boundary p {
  margin: 0;
  color: var(--neo-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.result-next-step {
  display: grid;
  gap: 0.2rem;
  margin: 1.1rem 0 0;
  border-left: 5px solid var(--neo-purple);
  padding-left: 0.8rem;
}

.result-next-step strong {
  font-family: var(--neo-font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.result-next-step span {
  color: var(--neo-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.chat-quick-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.5rem clamp(1rem, 3vw, 2rem);
}

.chat-page .conversation-canvas .chat-quick-actions .chat-jump {
  margin: 0;
}

.mission-drawer {
  scroll-margin-top: 7rem;
}

.demo-progress-tool > span small {
  display: block;
  max-width: 28rem;
  margin-top: 0.18rem;
  color: var(--neo-muted);
  font-family: var(--neo-font-body);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

:where(
  .judge-journey,
  .judge-journey ol,
  .judge-journey a,
  .demo-entry,
  .profile-journey-actions,
  .profile-truth-boundary,
  .result-next-step,
  .chat-quick-actions,
  .match-result-actions,
  .match-search-actions,
  .event-primary-action
) {
  min-inline-size: 0;
  max-inline-size: 100%;
}

:where(.judge-journey a, [data-primary-action], .chat-quick-actions a) {
  min-height: 44px;
}

:where(.judge-journey a, [data-primary-action], .chat-quick-actions a):focus-visible {
  position: relative;
  z-index: 2;
  outline: 3px solid var(--neo-ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--neo-yellow);
}

@media (max-width: 899px) {
  .judge-journey {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 1.15rem;
    border-radius: 0.95rem;
    box-shadow: var(--neo-shadow-sm);
  }

  .judge-journey-label {
    min-width: 0;
    min-height: 28px;
    padding: 0.25rem 0.6rem;
    font-size: 0.56rem;
  }

  .judge-journey a {
    min-height: 50px;
    flex-direction: column;
    justify-content: center;
    gap: 0.12rem;
    padding: 0.35rem 0.2rem;
    text-align: center;
  }

  .judge-journey a > span {
    font-size: 0.52rem;
  }

  .judge-journey a > strong {
    font-size: 0.68rem;
  }

  .judge-entry-actions,
  .demo-entry,
  .profile-journey-actions,
  .match-result-actions,
  .match-result-actions form,
  .match-search-actions,
  .match-search-actions form,
  .event-heading .button,
  .event-primary-action form,
  .event-primary-action .button {
    width: 100%;
  }

  .demo-entry {
    flex: none;
  }

  .demo-entry .button {
    min-height: 68px;
  }

  .profile-journey-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
    gap: 0.55rem;
  }

  .profile-journey-actions .profile-connections-action {
    grid-column: auto;
    margin-top: 0;
  }

  .profile-truth-boundary {
    justify-items: start;
    text-align: left;
  }

  .chat-quick-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-inline: 0.75rem;
  }

  .chat-quick-actions .button {
    width: 100%;
    justify-content: center;
  }

  .match-result-actions button,
  .match-search-actions button {
    width: 100%;
  }
}

@media (max-width: 359px) {
  .profile-journey-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .judge-journey a > strong {
    font-size: 0.61rem;
  }

  .judge-journey a > span {
    font-size: 0.48rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .judge-journey *,
  .demo-entry *,
  .chat-quick-actions * {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
    transform: none !important;
  }
}

@media (forced-colors: active) {
  .judge-journey,
  .judge-journey li + li,
  .demo-entry-label {
    border-color: CanvasText;
    box-shadow: none;
  }

  .judge-journey-label,
  .judge-journey a.is-active {
    background: Highlight;
    color: HighlightText;
  }
}
