/* PSEO-00: public Twitch category pages.
 *
 * Additive only. Loaded after blog-page.css, which supplies the page shell,
 * header, typography and spacing. Colour comes from the --content-* tokens in
 * content.css (the warm content theme) and NOT from tokens.css, which is the
 * logged-in dark theme -- mixing them is the most visible way to make this
 * page look bolted on. Mirrors report.css, its closest shipped sibling.
 */

/* --- Stat band -----------------------------------------------------------
 * Three cards in both tiers, always. An earlier draft gave tier 1 a fourth
 * for the top-decile share, and a differing card count is the most visible
 * way a reader comparing two categories could infer tier membership. That
 * figure lives in tier 1's prose instead.
 */
.cat-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 2rem;
    padding: 1.5rem;
    background-color: var(--content-bg-warm);
    border: 1px solid var(--content-border);
    border-radius: 8px;
}

.cat-stat {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cat-stat-value {
    font-family: 'Merriweather', serif;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    color: var(--content-primary-dark);
    font-variant-numeric: tabular-nums;
}

.cat-stat-label {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--content-text-secondary);
}

/* --- Method steps --------------------------------------------------------
 * The four-step block that teaches the whole method before the pitch. The
 * pillar chips make it read as the Find -> Build -> Activate funnel rather
 * than four disconnected tips.
 */
.cat-steps {
    list-style: none;
    counter-reset: step;
    margin: 2rem 0 1.5rem;
    padding: 0;
}

.cat-step {
    counter-increment: step;
    position: relative;
    padding: 0 0 1.75rem 3.25rem;
}

.cat-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 1.1rem;
    top: 2.6rem;
    bottom: 0.35rem;
    width: 2px;
    background-color: var(--content-border);
}

.cat-step::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
    background-color: var(--content-primary);
    border-radius: 50%;
}

.cat-step-label {
    display: inline-block;
    font-family: 'Merriweather', serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--content-primary-dark);
    background-color: var(--content-bg-warm);
    border: 1px solid var(--content-border);
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
    margin-bottom: 0.5rem;
}

.blog-content .cat-step h3 {
    font-size: 1.3rem;
    margin: 0 0 0.6rem;
    color: var(--content-text-primary);
}

.blog-content .cat-step p {
    font-size: 1.05rem;
    margin: 0 0 0.75rem;
    color: var(--content-text-secondary);
}

/* The "why it works" line at each give moment. */
.blog-content .cat-why {
    border-left: 3px solid var(--content-primary-light);
    background-color: var(--content-bg-warm);
    border-radius: 0 6px 6px 0;
    padding: 0.7rem 1rem;
    font-size: 0.98rem;
    margin: 0;
}

.cat-method-close {
    font-size: 1.05rem;
    color: var(--content-text-secondary);
}

/* --- Expectations callout (mirrors .csr-note) --------------------------- */
.cat-note {
    background-color: var(--content-card-bg);
    border: 1px solid var(--content-border);
    border-left: 4px solid var(--content-primary);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 1px 3px var(--content-shadow);
}

.blog-content .cat-note h2 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1.5rem;
}

.cat-note p:last-child {
    margin-bottom: 0;
}

/* --- CTA ---------------------------------------------------------------- */
.cat-cta {
    max-width: 800px;
    margin: 0 auto 3rem;
    background-color: var(--content-card-bg);
    border: 1px solid var(--content-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px var(--content-shadow);
}

.cat-cta h2 {
    font-size: 1.6rem;
    margin: 0 0 0.75rem;
    color: var(--content-text-primary);
}

.cat-cta p {
    color: var(--content-text-secondary);
    margin-bottom: 1.25rem;
}

.cat-cta-secondary {
    display: block;
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--content-primary);
}

.cat-links {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 0.95rem;
    color: var(--content-text-muted);
    text-align: center;
}

.cat-links a {
    color: var(--content-primary);
}

/* --- Hub ---------------------------------------------------------------- */
.cat-hub-head {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 2rem;
}

.cat-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 1000px;
    margin: 1.5rem auto 0.75rem;
}

.cat-filter input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    font-size: 1rem;
    color: var(--content-text-primary);
    background-color: var(--content-card-bg);
    border: 1px solid var(--content-border);
    border-radius: 8px;
}

.cat-filter-count {
    font-size: 0.9rem;
    color: var(--content-text-muted);
    white-space: nowrap;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    max-width: 1000px;
    margin: 1rem auto 3rem;
}

.cat-card {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    background-color: var(--content-card-bg);
    border: 1px solid var(--content-border);
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    box-shadow: 0 1px 3px var(--content-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cat-card:hover {
    box-shadow: 0 4px 12px var(--content-shadow-hover);
    transform: translateY(-2px);
}

/* Fixed box so a lazy-loaded image arriving late cannot shift the grid, and
   so a failed fetch still leaves the card its shape. */
.cat-card-art {
    width: 52px;
    height: 70px;
    flex: 0 0 52px;
    border-radius: 6px;
    object-fit: cover;
    background: linear-gradient(160deg, #f0e6d8, #e8d9c3);
}

.cat-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cat-card-name {
    display: block;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--content-text-primary);
    line-height: 1.3;
}

.cat-card-meta {
    display: block;
    font-size: 0.85rem;
    color: var(--content-text-muted);
}

.cat-no-matches {
    max-width: 1000px;
    margin: 0 auto 3rem;
    color: var(--content-text-secondary);
}

@media (max-width: 600px) {
    .cat-grid {
        grid-template-columns: 1fr;
    }

    .blog-content {
        padding: 1.5rem;
    }
}
