/* playbooks.css — Public Playbook library + detail pages.
   All selectors are pb-* prefixed so they don't collide with blog/docs. */

/* ─────────── Hero (library) ─────────── */
.pb-hero {
    padding: 64px 24px 32px;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
}
.pb-hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    border: 1px solid rgba(37, 99, 235, 0.25);
    color: var(--accent-light);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 18px;
}
.pb-hero-title {
    font-size: clamp(2.2rem, 4.6vw, 3.4rem);
    line-height: 1.08;
    margin: 0 0 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.pb-hero-sub {
    color: var(--text-secondary);
    font-size: 1.08rem;
    max-width: 720px;
    margin: 0 auto 22px;
    line-height: 1.55;
}
.pb-hero-stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.pb-hero-stat-dot { opacity: 0.5 }

/* ─────────── Filter bar ─────────── */
.pb-filters {
    max-width: 1200px;
    margin: 24px auto 8px;
    padding: 0 24px;
}
.pb-filters-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.pb-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.pb-filter-label {
    width: 90px;
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.pb-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pb-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}
.pb-pill-sm { padding: 5px 11px; font-size: 0.83rem; }
.pb-pill:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}
.pb-pill-active {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.4);
    color: var(--accent-light);
}
.pb-pill-icon { font-size: 1rem; }
.pb-pill-count {
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ─────────── Grid ─────────── */
.pb-grid-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}
.pb-results-meta {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 18px;
}
.pb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
}
.pb-empty {
    padding: 56px 24px;
    text-align: center;
    color: var(--text-secondary);
}
.pb-empty-icon { font-size: 3rem; margin-bottom: 14px; }

/* ─────────── Card (shared partial) ─────────── */
.pb-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}
.pb-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.pb-card-visual {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.04));
    overflow: hidden;
}
.pb-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pb-card-visual-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--accent-light);
}
.pb-card-video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}
.pb-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pb-card-meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pb-card-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.pb-card-pill-persona {
    background: rgba(37, 99, 235, 0.10);
    border-color: rgba(37, 99, 235, 0.3);
    color: var(--accent-light);
}
.pb-card-difficulty {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pb-card-difficulty-beginner { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
.pb-card-difficulty-intermediate { background: rgba(234, 179, 8, 0.12); color: #facc15; }
.pb-card-difficulty-advanced { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.pb-card-title {
    font-size: 1.08rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
    color: var(--text-primary);
}
.pb-card-summary {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    flex: 1;
}
.pb-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.pb-card-time { color: var(--text-muted); font-size: 0.82rem; }
.pb-card-surfaces { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pb-card-chip {
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: capitalize;
}
.pb-card-chip-more { color: var(--accent-light); border-color: rgba(37, 99, 235, 0.3); }

/* Compact variant for sidebars / rails */
.pb-card-compact .pb-card-visual { aspect-ratio: 16 / 8; }
.pb-card-compact .pb-card-body { padding: 12px 14px; }
.pb-card-compact .pb-card-title { font-size: 0.96rem; }

/* ─────────── Detail page ─────────── */
.pb-breadcrumb {
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.86rem;
}
.pb-breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.pb-breadcrumb a:hover { color: var(--accent-light); }

.pb-detail-hero {
    max-width: 1200px;
    margin: 28px auto 36px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
}
@media (max-width: 900px) {
    .pb-detail-hero { grid-template-columns: 1fr; }
}
.pb-detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    align-items: center;
}
.pb-detail-time {
    font-size: 0.84rem;
    color: var(--text-muted);
}
.pb-detail-title {
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    line-height: 1.12;
    margin: 0 0 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.pb-detail-summary {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0 0 22px;
}
.pb-detail-outcomes {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pb-detail-outcomes li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.pb-outcome-check { color: #4ade80; font-weight: 700; }
.pb-detail-cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

.pb-detail-hero-media {
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
    aspect-ratio: 16 / 9;
}
/* contain (not cover) so the full 1920x1080 frame is visible — the
   poster is the playbook's hero/profile-hub screenshot, and cropping
   it loses the populated agent cards the screenshot is showing off. */
.pb-detail-video, .pb-detail-hero-img { width: 100%; height: 100%; display: block; object-fit: contain; }
.pb-detail-hero-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem; color: var(--accent-light);
}

/* ─────────── Steps ─────────── */
.pb-steps {
    max-width: 880px;
    margin: 0 auto;
    padding: 12px 24px 56px;
}
.pb-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 56px;
}
.pb-step {
    scroll-margin-top: 80px;
}
.pb-step-header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}
.pb-step-num {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}
.pb-step-title { font-size: 1.45rem; margin: 0; line-height: 1.25; font-weight: 600; }
.pb-step-feature {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-size: 0.74rem;
    color: var(--text-muted);
    text-transform: capitalize;
}
.pb-step-figure {
    margin: 0 0 18px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}
.pb-step-figure img { width: 100%; height: auto; display: block; }
.pb-step-figure-pending { aspect-ratio: 16 / 9; }
.pb-step-figure-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.pb-step-body { color: var(--text-secondary); font-size: 1rem; line-height: 1.65; }
.pb-step-body p { margin: 0 0 12px; }
.pb-step-body code {
    background: rgba(37, 99, 235, 0.10);
    color: var(--accent-light);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.92em;
}
.pb-step-body pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
}
.pb-step-tip {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
    background: rgba(37, 99, 235, 0.06);
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
}
.pb-step-tip strong { color: var(--accent-light); }

/* ─────────── Related + bottom CTA ─────────── */
.pb-related {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 0;
}
.pb-related-title {
    font-size: 1.4rem;
    margin: 0 0 18px;
    font-weight: 600;
}
.pb-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.pb-bottom-cta {
    max-width: 1200px;
    margin: 56px auto 80px;
    padding: 0 24px;
}
.pb-bottom-cta-inner {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--radius);
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.18);
}
.pb-bottom-cta-inner h3 { font-size: 1.5rem; margin: 0 0 8px; }
.pb-bottom-cta-inner p { color: var(--text-secondary); margin: 0 0 18px; }

/* ─────────── Cross-mount rail (used on /, /agents, /blog) ─────────── */
.pb-rail {
    max-width: 1200px;
    margin: 48px auto;
    padding: 0 24px;
}
.pb-rail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}
.pb-rail-title { font-size: 1.4rem; font-weight: 600; margin: 0; }
.pb-rail-link { color: var(--accent-light); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.pb-rail-link:hover { text-decoration: underline; }
.pb-rail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
