/* "It doesn't guess. It checks." section.
   Isolated under nc-trace-* selectors; uses the site tokens from styles.css. */

.nc-trace {
  background: var(--ivory);
  overflow: hidden;
}
.nc-trace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: center;
}

/* Copy */
.nc-trace-copy h2 {
  margin: 17px 0 16px;
  color: var(--navy);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.045em;
}
.nc-trace-copy h2 span {
  color: #119e93;
}
.nc-trace-lede {
  max-width: 520px;
  margin: 0;
  color: #5f7080;
  font-size: 15px;
  line-height: 1.8;
}
.nc-trace-points {
  display: grid;
  gap: 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.nc-trace-points li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.nc-trace-point-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  background: #fff;
  color: #0f7a5a;
  box-shadow: 0 6px 16px rgba(11, 37, 69, 0.08);
}
.nc-trace-point-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nc-trace-points h3 {
  margin: 1px 0 4px;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.nc-trace-points p {
  margin: 0;
  color: #5f7080;
  font-size: 14px;
  line-height: 1.65;
}

/* Product window */
.nc-trace-demo {
  margin: 0;
}
.nc-trace-window {
  overflow: hidden;
  border: 1px solid #d5e4e0;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.nc-trace-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid #e3ece9;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.nc-trace-bar img {
  width: 22px;
  height: 22px;
}
.nc-trace-bar em {
  color: #119e93;
  font-style: normal;
}
.nc-trace-connected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: #668174;
  font-size: 11px;
  font-weight: 600;
}
.nc-trace-connected i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #26bf8e;
}
.nc-trace-replay {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid #d5e4e0;
  border-radius: 999px;
  background: #fff;
  color: #0f7a5a;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.nc-trace-replay:hover {
  border-color: var(--teal);
  background: #f1faf8;
}
.nc-trace-replay:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.nc-trace-demo.is-interactive .nc-trace-replay {
  display: inline-flex;
}
.nc-trace-replay svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nc-trace-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 22px 22px;
  background: #fbfdfc;
}
.nc-trace-question {
  align-self: flex-end;
  max-width: 82%;
  margin: 0;
  padding: 11px 16px;
  border-radius: 14px 14px 4px 14px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
}
.nc-trace-reply {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.nc-trace-mark {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e0f4eb;
}
.nc-trace-mark img {
  width: 22px;
  height: 22px;
}
.nc-trace-card {
  flex: 1;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid #e3ece9;
  border-radius: 4px 16px 16px 16px;
  background: #fff;
}
.nc-trace-note {
  margin: 0 0 12px;
  color: #7b8b98;
  font-size: 13px;
  font-style: italic;
  line-height: 1.55;
}

/* Steps */
.nc-trace-steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nc-trace-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #3d5266;
  font-size: 14px;
  line-height: 1.4;
}
.nc-trace-step-icon {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
.nc-trace-step-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.nc-trace-step.is-done .nc-trace-step-icon::before {
  border: 2px solid #16a06d;
}
.nc-trace-step.is-done .nc-trace-step-icon::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3.5px;
  width: 4px;
  height: 8px;
  border: solid #16a06d;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.nc-trace-step.is-running {
  color: var(--navy);
  font-weight: 600;
}
.nc-trace-step.is-running .nc-trace-step-icon::before {
  border: 2px solid #cfe9e4;
  border-top-color: var(--teal);
  animation: nc-trace-spin 0.8s linear infinite;
}
.nc-trace-step b {
  color: inherit;
  font-weight: 600;
}
.nc-trace-time {
  color: #94a3b2;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.nc-trace-step:not(.is-done) .nc-trace-time {
  visibility: hidden;
}

/* Status line */
.nc-trace-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: #0b7f72;
  font-size: 13.5px;
  font-weight: 700;
}
.nc-trace-pulse {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  animation: nc-trace-pulse 1.2s ease-in-out infinite;
}
.nc-trace-status.is-done .nc-trace-pulse {
  animation: none;
  background: #16a06d;
}
.nc-trace-clock {
  margin-left: auto;
  color: #94a3b2;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Answer */
.nc-trace-answer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #edf2f0;
}
.nc-trace-answer strong {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 15px;
}
.nc-trace-answer ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nc-trace-answer li {
  position: relative;
  padding-left: 16px;
  color: #324b5a;
  font-size: 13.5px;
  line-height: 1.55;
}
.nc-trace-answer li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.nc-trace-answer li b {
  color: var(--navy);
}
.nc-trace-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: #6b7c8a;
  font-size: 11.5px;
  font-weight: 600;
}
.nc-trace-sources span {
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef6f3;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.nc-trace-footnote {
  max-width: 900px;
  margin: 26px auto 0;
  color: #74838e;
  text-align: center;
  font-size: 10px;
  line-height: 1.6;
}

/* Animation states, applied by script.js while the example plays */
.nc-trace-hidden {
  opacity: 0;
  transform: translateY(6px);
}
.nc-trace-demo.is-interactive .nc-trace-note,
.nc-trace-demo.is-interactive .nc-trace-step,
.nc-trace-demo.is-interactive .nc-trace-answer {
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

@keyframes nc-trace-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes nc-trace-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@media (max-width: 1050px) {
  .nc-trace-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }
  .nc-trace-lede {
    max-width: 640px;
  }
}
@media (max-width: 540px) {
  .nc-trace-body {
    padding: 18px 14px 16px;
  }
  .nc-trace-card {
    padding: 15px 14px;
  }
  .nc-trace-question {
    max-width: 92%;
    font-size: 13.5px;
  }
  .nc-trace-mark {
    display: none;
  }
  .nc-trace-connected {
    display: none;
  }
  .nc-trace-demo.is-interactive .nc-trace-replay {
    margin-left: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nc-trace-pulse,
  .nc-trace-step.is-running .nc-trace-step-icon::before {
    animation: none;
  }
}
