/* Photo landing pages (photoTopicPage in scripts/build-pages.mjs) and the "Photo collections" strip on the
   photo editing hub. Loaded only on those pages. Colours come from the tokens in style.css, so dark mode follows. */

.ph-head { max-width: 780px; margin: 0 0 28px; }
.ph-head .lede { margin: 12px 0 0; }
.ph-meta { margin: 14px 0 0; font-size: 14px; color: var(--ink-muted); }

/* Example picture + prompt window */
.ph-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; margin: 0 0 48px; }
.ph-fig { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ph-fig-img { display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-card-subtle); box-shadow: var(--shadow-hard); }
.ph-fig-img img { display: block; width: 100%; height: auto; }
.ph-fig figcaption { font-size: 13.5px; color: var(--ink-muted); }
.ph-prompt { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ph-prompt .pp-win { padding: 10px; border-radius: var(--radius-lg); }
.ph-prompt .prompt-text { max-height: 340px; }
.ph-prompt .pp-actions { margin: 0; }
.ph-more-link { margin: 0; font-size: 14px; }
.ph-more-link a { color: var(--accent-ink); }

/* 3 steps */
.ph-steps-band { margin: 0 0 48px; }
.step-cards.ph-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Tips and fixes, side by side */
.ph-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin: 0 0 48px; }
.ph-two h2 { margin: 0 0 14px; font-family: var(--font-display); font-size: 28px; line-height: 1.15; color: var(--ink-primary); }
.ph-tips ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.6; color: var(--ink-secondary); }
.ph-tips strong { color: var(--ink-primary); }
.ph-fixes dl { margin: 0; background: var(--bg-card); border: 1px solid var(--border-line); border-radius: var(--radius-md); overflow: hidden; }
.ph-fixes dl > div { padding: 14px 18px; border-bottom: 1px solid var(--border-line); }
.ph-fixes dl > div:last-child { border-bottom: 0; }
.ph-fixes dt { font-weight: 700; color: var(--ink-primary); }
.ph-fixes dd { margin: 4px 0 0; color: var(--ink-secondary); line-height: 1.55; }

/* Related collections */
.ph-related { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 24px 0 0; }
.ph-related span { font-weight: 700; color: var(--ink-primary); }
.ph-related a { padding: 8px 14px; border-radius: var(--radius-full); background: var(--bg-card); border: 1px solid var(--border-line); color: var(--ink-primary); font-size: 14px; font-weight: 600; text-decoration: none; }
.ph-related a:hover { border-color: var(--outline-strong); }

/* Two tool cards */
.ph-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin: 0 0 48px; }
.ph-tool { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--radius-lg); color: var(--ink-primary); text-decoration: none; transition: transform var(--transition-fast); }
.ph-tool:hover { transform: translateY(-2px); }
.ph-tool strong { font-family: var(--font-display); font-size: 22px; line-height: 1.2; }
.ph-tool span:last-child { color: var(--ink-secondary); }
.ph-tool-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.ph-tool-peach { background: var(--cat-photo); }
.ph-tool-peach .ph-tool-kicker { color: var(--cat-photo-accent); }
.ph-tool-lilac { background: #F3E8FF; }
.ph-tool-lilac .ph-tool-kicker { color: #6B21A8; }
[data-theme="dark"] .ph-tool-lilac { background: #2A1F3D; }
[data-theme="dark"] .ph-tool-lilac .ph-tool-kicker { color: #D8B4FE; }

/* "Photo collections" strip on the photo editing hub */
.ph-collections .more-head span { color: var(--ink-muted); font-size: 14px; }
.seo-page .seo-section > .ph-coll-grid { max-width: none; }
.ph-coll-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.ph-coll-grid a { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; height: 100%; min-height: 92px; box-sizing: border-box; padding: 14px 16px; border-radius: var(--radius-md); border: 1px solid transparent; color: var(--ink-primary); text-decoration: none; transition: border-color var(--transition-fast), transform var(--transition-fast); }
.ph-coll-grid a:hover { border-color: var(--outline-strong); transform: translateY(-2px); }
.ph-coll-0 { background: var(--cat-photo); }
.ph-coll-1 { background: var(--cat-image); }
.ph-coll-2 { background: var(--cat-video); }
.ph-coll-3 { background: var(--cat-text); }
.ph-coll-grid span { font-weight: 700; line-height: 1.3; }
.ph-coll-grid small { color: var(--ink-secondary); font-weight: 600; }

@media (max-width: 900px) {
  .ph-hero, .ph-two { grid-template-columns: minmax(0, 1fr); }
  .step-cards.ph-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ph-tools { grid-template-columns: minmax(0, 1fr); }
  .ph-two h2 { font-size: 24px; }
  .ph-coll-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
