/* The methodology deck (assets/js/how.js). Tokens only from tokens.css. */

.how {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.how-kicker {
  margin: 0 0 8px;
  color: var(--pink);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .02em;
}

.how-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.15;
  color: var(--ink);
}

.how-lead {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--body);
}

.how-note {
  font-size: 16px;
  line-height: 1.55;
  color: var(--body);
  min-height: 96px;
}

.how-note p { margin: 0 0 10px; }
.how-note b, .how-note strong { color: var(--ink); }
.how-note .num { font-family: var(--font-display); color: var(--pink); }

.how-prompts { display: grid; gap: 12px; margin-top: 12px; }

.prompt {
  margin: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--pink);
  border-radius: var(--r-small);
  background: var(--card);
  overflow: hidden;
}

.prompt figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 8px 12px;
  background: var(--pink-soft);
  font-size: 13px;
}

.prompt-title { font-weight: 600; color: var(--ink); }
.prompt-source { color: var(--soft); overflow-wrap: anywhere; }

.prompt pre {
  margin: 0;
  padding: 10px 12px;
  max-height: 220px;
  overflow: auto;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--body);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.how-side { position: sticky; top: 88px; display: grid; gap: 12px; min-width: 0; }

.how-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  touch-action: pan-y;
}

.how-svg { display: block; width: 100%; height: 100%; font-family: var(--font); }

.how-frame { position: relative; }

/* A hover hint over the stage: where we are and how to move on. */
.how-cap {
  position: absolute;
  left: 12px;
  bottom: 12px;
  margin: 0;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--card);
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}

.how-frame:hover .how-cap, .how-frame:focus-within .how-cap { opacity: 1; transform: none; }

.how-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-family: var(--font-display);
  color: var(--soft);
}

.how-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.how-dots { display: flex; gap: 6px; flex: 1 1 auto; flex-wrap: wrap; align-items: center; }

.how-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--line);
  cursor: pointer;
  transition: transform 240ms var(--ease), opacity 240ms var(--ease);
}

.how-dot:hover { transform: scale(1.3); }
.how-dot[aria-current="step"] { background: var(--pink); transform: scale(1.35); }
.how-dot:focus-visible, .how-nav .pill:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.how-step { font-size: 14px; color: var(--soft); min-width: 44px; text-align: center; }

.how-nav .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--ink);
  font: 500 15px var(--font);
  cursor: pointer;
}

.how-nav .pill:hover { border-color: var(--pink); }
.how-nav .pill:disabled { opacity: .4; cursor: default; }
.how-nav .pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.how-nav .how-play svg path { fill: currentColor; }
.how-nav .how-arrow { padding: 0 12px; }

@media (max-width: 760px) {
  .how { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .how-side { position: static; order: -1; }
  .how-dots { gap: 5px; }
  .how-step { display: none; }
  .how-play span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .how-dot, .how-cap { transition: none; }
}
