/* SmeltTrail Walkthrough, Zero-Upload HTS Wedge, Hero Crucible Stage & Workspace */

.section-walkthrough { padding: clamp(3rem, 6vw, 5rem) 0; }
.walkthrough-plate { padding: clamp(1.3rem, 3vw, 2.25rem); }
.walkthrough-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1.25rem; margin-bottom: 1.4rem;
}
.walkthrough-lede { margin-top: 0.75rem; max-width: 56ch; }
.wt-stage {
  border-radius: 20px; overflow: hidden;
  background: var(--vault-950); border: 1px solid var(--plate-border);
  box-shadow: 0 22px 48px -22px rgba(12, 25, 20, 0.42);
}
.walkthrough-svg { display: block; width: 100%; height: auto; min-height: 160px; }
.wt-node rect:first-child { transition: stroke 0.25s ease, fill 0.25s ease; }
.wt-node.is-active rect:first-child { stroke: #279472; stroke-width: 2.5; fill: #19342a; }
.wt-controls { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.1rem; }
.video-caption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-top: 0.85rem; font-size: 0.9rem; color: var(--ink-600);
}

/* Zero-Upload HTS Wedge */
.section-lookup { padding: clamp(3.25rem, 6vw, 5.25rem) 0; }
.lookup-intro { margin-bottom: 1.75rem; }
.preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; margin-bottom: 1.4rem; }
.preset-label {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.13em;
  color: var(--ink-500); text-transform: uppercase; margin-right: 0.25rem;
}
.preset-btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 0.48rem 0.98rem; border-radius: 999px;
  font-size: 0.85rem; font-weight: 500; color: var(--ink-800);
  background: #fff; border: 1px solid var(--border);
  white-space: normal; overflow-wrap: anywhere; max-width: 100%;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.preset-btn:hover { border-color: var(--emerald-500); color: var(--emerald-600); }
.preset-btn.is-active { background: var(--emerald-500); border-color: var(--emerald-500); color: #fff; }

.lookup-grid { display: grid; gap: 1.4rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .lookup-grid { grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.12fr); align-items: start; } }
.lookup-card { padding: clamp(1.25rem, 2.8vw, 2.15rem); min-width: 0; }
.lookup-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding-bottom: 1rem; margin-bottom: 1.15rem; border-bottom: 1px solid var(--border);
}
.lookup-head h2, .lookup-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.48rem; font-weight: 500; }

.wedge-form { display: grid; gap: 0.95rem; }
.form-row-2 { display: grid; gap: 0.9rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .form-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.check-row {
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px;
  font-size: 0.9rem; color: var(--ink-800); cursor: pointer; max-width: 100%;
}
.check-row input[type="checkbox"] {
  width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--emerald-500);
}
.wedge-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 0.25rem; }

.route-meta {
  container-type: inline-size;
  background: var(--emerald-50); border: 1px solid var(--plate-border);
  border-radius: 18px; padding: 1.05rem 1.15rem; display: grid; gap: 0.8rem;
}
.route-stats { display: grid; gap: 0.75rem 1rem; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 400px) { .route-stats { grid-template-columns: minmax(0, 1.3fr) auto auto; } }
.route-stat-label {
  display: block; font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 0.18rem;
}
.route-stat-val { font-weight: 600; font-size: 0.92rem; color: var(--ink-900); }
.urgency-chip {
  display: inline-block; font-family: var(--font-mono); font-size: 0.75rem;
  padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--emerald-100); color: var(--emerald-700);
}
.urgency-chip.is-urgent { background: var(--copper-100); color: var(--copper-800); }

.route-warning {
  margin: 0; padding: 0.75rem 0.95rem; border-radius: 12px; font-size: 0.88rem;
  background: var(--copper-100); color: var(--copper-800); line-height: 1.5; overflow-wrap: anywhere;
}
.route-warning.is-clean { background: #fff; color: var(--ink-700); border: 1px solid var(--border); }
.route-warning:empty { display: none; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; padding: 0.28rem 0.7rem; border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  white-space: normal; overflow-wrap: anywhere; max-width: 100%;
}
.badge-ok { background: rgba(20, 115, 86, 0.12); color: var(--emerald-700); border: 1px solid rgba(20, 115, 86, 0.25); }
.badge-warn { background: rgba(200, 100, 32, 0.14); color: #8c3f0e; border: 1px solid rgba(200, 100, 32, 0.28); }
.badge-danger { background: rgba(185, 28, 28, 0.11); color: #991b1b; border: 1px solid rgba(185, 28, 28, 0.26); }
.badge-accent { background: var(--vellum-dawn); color: var(--ink-800); border: 1px solid var(--border); }

/* Workspace */
.ws-topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; padding: clamp(1.2rem, 2.8vw, 1.85rem);
}
.ws-user-email, #chase-link-output { overflow-wrap: anywhere; max-width: 100%; }

/* Hero Crucible Stage Parallax & Probe Beams */
.hero-stage { position: relative; width: min(100%, 620px); perspective: 900px; cursor: pointer; }
.hero-stage-svg { display: block; width: 100%; height: auto; }
.hero-stage-body {
  position: relative;
  transform:
    translate3d(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -8px), 0)
    rotateY(calc(var(--mx, 0) * 3deg))
    rotateX(calc(var(--my, 0) * -2.2deg));
}
.probe-beams, .probe-glow { opacity: 0; transition: opacity 0.32s var(--ease-expo); }
.hero-stage[data-lit="true"] .probe-beams,
.hero-stage:hover .probe-beams,
.hero-stage[data-lit="true"] .probe-glow,
.hero-stage:hover .probe-glow { opacity: 1; }
.falling-seal, .calibration-arc { opacity: 0.92; }
@media (prefers-reduced-motion: no-preference) {
  .hero-stage.is-dropping .falling-seal { animation: seal-pulse 1.5s var(--ease-expo); }
  .hero-stage.is-dropping .calibration-arc { animation: arc-glow 1.5s ease-out; }
}
@keyframes seal-pulse {
  0% { transform: translate(0, 0) scale(1); }
  35% { transform: translate(4px, 10px) scale(1.06); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes arc-glow {
  0% { stroke: #147356; stroke-width: 2.6; }
  45% { stroke: #c86420; stroke-width: 4; }
  100% { stroke: #147356; stroke-width: 2.6; }
}
.probe-ripples { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.probe-ripple {
  position: absolute; width: 150px; height: 150px; margin: -75px 0 0 -75px;
  border-radius: 999px; border: 2px solid var(--emerald-500);
  animation: probe-sonar 1.2s var(--ease-expo) forwards;
}
@keyframes probe-sonar { from { transform: scale(0.15); opacity: 0.72; } to { transform: scale(1.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .hero-stage-body { transform: none; } }

@media (max-width: 420px) {
  button,
  .btn-primary,
  .btn-secondary,
  .btn-ghost,
  .btn-link,
  .preset-btn,
  .pill-tab,
  .wb-pill,
  .wb-len,
  .replay-btn,
  .footer-link-btn,
  .check-row,
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select {
    min-height: 44px;
  }
}
