/* The /prompts catalogue and the prompt pages. Built on style.css. */

.prompts-page { max-width: 860px; margin: 0 auto; padding: 32px 16px 64px; }
.prompts-page > article { width: auto; max-width: 100%; box-sizing: border-box; }

.prompt-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px; font-size: var(--fs-7); color: var(--light-gray-70); white-space: nowrap; }
.prompt-back { color: var(--light-gray); text-decoration: none; padding: 6px 12px; border: 1px solid var(--jet);
  border-radius: 20px; transition: var(--transition-1); }
.prompt-back::before { content: "\2190\00a0"; }
.prompt-back:hover { color: var(--orange-yellow-crayola); border-color: var(--orange-yellow-crayola); }

.prompts-intro p { color: var(--light-gray); font-size: var(--fs-5); line-height: 1.7; margin-bottom: 12px; }

/* --- catalogue --- */
.prompt-list { display: grid; gap: 18px; margin: 24px 0 0; padding: 0; list-style: none; }
.prompt-item { min-width: 0; padding-top: 22px; }
.prompt-item.has-thumb { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: center; }
.prompt-item-thumb { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--jet); }
.prompt-item-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  transition: var(--transition-1); }
.prompt-item-thumb:hover img { transform: scale(1.03); }
.prompt-item-link { text-decoration: none; }
.prompt-item-title { color: var(--white-2); font-size: var(--fs-2); font-weight: var(--fw-600); margin-bottom: 8px;
  transition: var(--transition-1); }
.prompt-item-link:hover .prompt-item-title { color: var(--orange-yellow-crayola); }
.prompt-open { display: inline-block; margin-top: 4px; color: var(--orange-yellow-crayola); font-size: var(--fs-6);
  font-weight: var(--fw-500); text-decoration: none; }
.prompt-open:hover { text-decoration: underline; }
.prompt-tag { padding: 2px 10px; border: 1px solid var(--jet); border-radius: 20px; color: var(--light-gray); }

/* --- shared --- */
.prompt-summary { color: var(--light-gray); font-size: var(--fs-6); line-height: 1.65; margin-bottom: 12px; }
.prompt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px;
  font-size: var(--fs-7); color: var(--light-gray-70); }
.prompt-meta a { color: var(--orange-yellow-crayola); text-decoration: none; }
.prompt-meta a:hover { text-decoration: underline; }
.prompts-foot { margin-top: 36px; color: var(--light-gray-70); font-size: var(--fs-7); line-height: 1.6; text-align: center; }
.prompts-foot a { color: var(--orange-yellow-crayola); text-decoration: none; }

/* --- a prompt's page --- */
.prompt-h1 { color: var(--white-2); font-size: 26px; font-weight: var(--fw-600); line-height: 1.3;
  margin-bottom: 10px; text-transform: none; }
.prompt-lead { color: var(--light-gray); font-size: var(--fs-4); line-height: 1.7; margin-bottom: 22px; }

.prompt-card { min-width: 0; padding-top: 15px; margin-bottom: 30px; }
.prompt-box { position: relative; background: hsl(240, 2%, 9%); border: 1px solid var(--jet); border-radius: 10px; }
.prompt-text { margin: 0; padding: 16px 16px 18px; max-height: 300px; overflow: hidden; white-space: pre-wrap;
  word-break: break-word; color: var(--white-2); font: 400 13.5px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.prompt-box.is-open .prompt-text { max-height: none; }
.prompt-box:not(.is-open)::after { content: ""; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 80px;
  border-radius: 0 0 10px 10px; pointer-events: none; background: linear-gradient(transparent, hsl(240, 2%, 9%)); }
.prompt-actions { display: flex; gap: 10px; margin-top: 12px; }
.prompt-copy, .prompt-toggle { font: 600 var(--fs-6) var(--ff-poppins); border-radius: 10px; padding: 10px 18px;
  cursor: pointer; transition: var(--transition-1); }
.prompt-copy { background: var(--orange-yellow-crayola); color: hsl(0, 0%, 8%); border: 0; }
.prompt-copy:hover { filter: brightness(1.08); }
.prompt-copy.is-done { background: hsl(140, 45%, 55%); }
.prompt-toggle { background: transparent; color: var(--light-gray); border: 1px solid var(--jet); }
.prompt-toggle:hover { color: var(--white-2); border-color: var(--light-gray-70); }

.prompt-body section, .prompt-video { margin-bottom: 28px; }
.prompt-body h2, .prompt-video h2 { color: var(--white-2); font-size: var(--fs-1); font-weight: var(--fw-600);
  margin-bottom: 12px; text-transform: none; }
.prompt-body h3 { color: var(--orange-yellow-crayola); font-size: var(--fs-3); font-weight: var(--fw-600);
  margin: 18px 0 6px; text-transform: none; }
.prompt-body p { color: var(--light-gray); font-size: var(--fs-5); line-height: 1.75; margin-bottom: 12px; }
.prompt-body strong { color: var(--white-2); }
.prompt-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 14px; padding: 0;
  list-style: none; counter-reset: step; }
.prompt-steps li { counter-increment: step; background: var(--eerie-black-1); border: 1px solid var(--jet);
  border-radius: 12px; padding: 14px; color: var(--light-gray); font-size: var(--fs-6); line-height: 1.5; }
.prompt-steps li::before { content: counter(step); display: block; margin-bottom: 6px; color: var(--orange-yellow-crayola);
  font-weight: var(--fw-600); font-size: var(--fs-3); }

.yt-lite { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--jet); border-radius: 12px;
  overflow: hidden; cursor: pointer; background: #000; aspect-ratio: 16 / 9; }
.yt-lite img { display: block; width: 100%; height: 100%; object-fit: cover; transition: var(--transition-1); }
.yt-lite:hover img { filter: brightness(0.85); }
.yt-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%);
  background: hsl(0, 100%, 50%); border-radius: 14px; }
.yt-play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid;
  border-width: 10px 0 10px 18px; border-color: transparent transparent transparent #fff; }
.yt-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }
.prompt-video-title { margin-top: 10px; font-size: var(--fs-6); }
.prompt-video-title a { color: var(--orange-yellow-crayola); text-decoration: none; }

@media (max-width: 600px) {
  .prompt-item.has-thumb { grid-template-columns: 1fr; }
  .prompt-item-thumb { order: -1; }
  .prompts-page { padding: 20px 8px 48px; }
  .prompts-page > article { padding: 18px 14px; }
  .prompt-h1 { font-size: 21px; }
  .prompt-card, .prompt-item { padding: 18px 12px 14px; }
  .prompt-text { font-size: 12.5px; padding: 12px; }
  .prompt-steps { grid-template-columns: 1fr; }
}
