/* ==========================================================================
   Atelier — free resources page (inc/resources.php, resources.php). Only loaded on /resources/ and /r/<slug>/.
   Mobile first: one card per row, the demo video on top; from 900px the video sits beside the copy.
   The prompt is a dark panel (the one "wow" block on the light page) with a Copy pill.
   ========================================================================== */
.res-hero { padding-bottom: clamp(20px, 3vw, 36px); }
.res-hero-one { padding-block: clamp(40px, 6vw, 88px) clamp(20px, 3vw, 36px); }
.res-h1 { max-width: 20ch; margin: 0 auto; font-size: clamp(34px, 5vw, 64px); line-height: 1; text-wrap: balance; }
.res-hero .display-l em { font-style: normal; color: var(--eyebrow, var(--accent)); }

/* search: one big rounded field */
.res-search {
  position: relative; display: flex; align-items: center; gap: 10px; width: min(100%, 560px); min-height: 56px;
  margin: 28px auto 0; padding: 0 20px; border-radius: var(--r-pill); background: var(--panel, #fff); color: var(--ash);
  box-shadow: 0 0 0 1px var(--line, rgba(10, 15, 26, .1)), 0 18px 40px -24px rgba(10, 15, 26, .35); transition: box-shadow .25s;
}
.res-search:focus-within { box-shadow: 0 0 0 2px var(--accent), 0 18px 40px -24px rgba(10, 15, 26, .35); }
.res-search input { flex: 1; min-width: 0; height: 54px; border: 0; background: transparent; color: var(--text); font-size: 17px; outline: none; }
.res-search input::placeholder { color: var(--slate); }
.res-search input::-webkit-search-cancel-button { cursor: pointer; }

.res-wrap { padding-bottom: clamp(72px, 10vw, 140px); }
.res-count { margin: 0 auto 14px; max-width: 1040px; font-size: 14px; color: var(--ash); }
.res-back { margin: 0 auto 14px; max-width: 1040px; }
.res-back a { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.res-back .ic { transform: rotate(180deg); }
.res-list { display: grid; gap: 16px; max-width: 1040px; margin-inline: auto; }

/* card */
.res-card {
  display: grid; overflow: hidden; border-radius: var(--r-tile); background: var(--panel, #fff);
  box-shadow: 0 1px 0 rgba(10, 15, 26, .04), 0 24px 48px -30px rgba(10, 15, 26, .3);
}
.res-card[hidden] { display: none; }
.res-media { display: grid; place-items: center; padding: 20px 20px 0; background: radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), #0a0f1a; }
.res-media video { width: auto; height: min(62vh, 420px); max-width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 18px 18px 0 0; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.res-body { display: grid; align-content: start; gap: 16px; padding: 22px 20px 24px; min-width: 0; }
.res-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 13px; color: var(--ash); }
.res-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--link); font-weight: 600; }
.res-title { margin: 0; font-size: clamp(26px, 3.2vw, 38px); line-height: 1; }
.res-title a { color: var(--text); text-decoration: none; }
.res-title a:hover { color: var(--accent); }
.res-sum { margin: -4px 0 0; font-size: 17px; line-height: 1.45; color: var(--ash); }

.res-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.res-steps li { counter-increment: step; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 15px; line-height: 1.4; }
.res-steps li::before {
  content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--text); color: var(--panel, #fff); font: 700 12px/1 var(--font-text);
}

/* the prompt: dark panel, folded to a few lines until "Show the whole prompt" */
.res-prompt { position: relative; border-radius: 18px; background: #0a0f1a; color: #e9edf5; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset; }
.res-prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 0 18px; }
.res-prompt-head b { font: 600 12px/1 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: #8fb8ff; }
.res-copy { gap: 6px; min-height: 36px; }
.res-copy.is-done, .res-short.is-done { background: #1f9d55; color: #fff; }
.res-prompt-text {
  margin: 0; padding: 12px 18px 18px; max-height: 9.6em; overflow: hidden; white-space: pre-wrap; word-break: break-word;
  font: 400 15px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0; color: inherit;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
}
.res-prompt.is-open .res-prompt-text { max-height: none; -webkit-mask-image: none; mask-image: none; }
.res-more { display: block; width: 100%; padding: 0 18px 14px; border: 0; background: none; color: #8fb8ff; font-size: 14px; font-weight: 600; text-align: left; }
.res-more:hover { color: #fff; }

.res-tools h3 { margin: 0 0 8px; font: 600 12px/1 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: var(--ash); }
.res-tools ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.res-tools li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--panel-2, #f1eee8); }
.res-tools a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.res-tools a .ic { transform: rotate(-45deg); color: var(--accent); }
.res-tools span { font-size: 14px; color: var(--ash); }

.res-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.res-short {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; max-width: 100%; padding: 0 14px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--link); font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line, rgba(10, 15, 26, .12));
}
.res-short span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-short:hover { box-shadow: inset 0 0 0 1px var(--link); }

.res-empty { display: grid; justify-items: center; gap: 6px; max-width: 1040px; margin: 0 auto; padding: 48px 20px; border-radius: var(--r-tile); background: var(--panel, #fff); text-align: center; }
.res-empty[hidden] { display: none; }
.res-empty p { margin: 0; font-size: 19px; }
.res-empty .muted { font-size: 15px; margin-bottom: 10px; }

@media (min-width: 900px) {
  .res-card { grid-template-columns: 320px minmax(0, 1fr); }
  .res-media { padding: 28px; align-content: center; }
  .res-media video { height: auto; width: 100%; max-height: 520px; border-radius: 18px; }
  .res-body { padding: 32px 36px 34px; }
  .res-prompt-text { font-size: 15.5px; }
  .res-tools ul { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 560px) {
  .res-media video { height: 300px; }
  .res-search { min-height: 52px; }
}

/* the Signature skin draws outline pills for dark grounds: on the white card they need dark ink */
.res-card .pill-outline, .res-empty .pill-outline { box-shadow: inset 0 0 0 2px rgba(10, 15, 26, .3); color: #0a0f1a; }
.res-card .pill-outline:hover, .res-empty .pill-outline:hover { box-shadow: inset 0 0 0 2px #0a0f1a; color: #0a0f1a; }
