/* CareerFlora Category Hub Redesign — Shared flagship directory UI */
:root {
    --cf-cat-accent: #d62828;
    --cf-cat-bg: #f8fafc;
    --cf-cat-surface: #ffffff;
    --cf-cat-surface-alt: #f1f5f9;
    --cf-cat-ink: #0f172a;
    --cf-cat-ink-2: #334155;
    --cf-cat-muted: #64748b;
    --cf-cat-border: #e2e8f0;
    --cf-cat-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
    --cf-cat-shadow-hover: 0 18px 36px rgba(15, 23, 42, 0.12);
    --cf-cat-radius: 16px;
}

@media (prefers-color-scheme: dark) {
    html:not([data-cf-theme="light"]) {
        --cf-cat-bg: #0b1120;
        --cf-cat-surface: #131b2e;
        --cf-cat-surface-alt: #1b253b;
        --cf-cat-ink: #f1f5f9;
        --cf-cat-ink-2: #cbd5e1;
        --cf-cat-muted: #94a3b8;
        --cf-cat-border: #25334d;
        --cf-cat-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
        --cf-cat-shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.45);
    }
}

html[data-cf-theme="dark"] {
    --cf-cat-bg: #0b1120;
    --cf-cat-surface: #131b2e;
    --cf-cat-surface-alt: #1b253b;
    --cf-cat-ink: #f1f5f9;
    --cf-cat-ink-2: #cbd5e1;
    --cf-cat-muted: #94a3b8;
    --cf-cat-border: #25334d;
    --cf-cat-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    --cf-cat-shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.45);
}

#cf-category-main {
    background: var(--cf-cat-bg);
    color: var(--cf-cat-ink);
    padding-bottom: 48px;
}

/* ── Unified Flagship Hero (Light-first paper + crimson aura, seamless Dark Mode) ── */
.cf-cat-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 70% at 88% -5%, color-mix(in srgb, var(--cf-cat-accent) 12%, transparent), transparent 62%),
        radial-gradient(ellipse 60% 55% at 8% 100%, rgba(214, 40, 40, 0.05), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--cf-cat-ink);
    padding: clamp(24px, 3.8vw, 42px) 0 clamp(28px, 4vw, 44px);
    border-bottom: 1px solid var(--cf-cat-border);
}

.cf-cat-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.8), transparent 78%);
    pointer-events: none;
}

.cf-cat-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
    gap: clamp(20px, 3vw, 40px);
    align-items: center;
}

.cf-hero-bc {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--cf-cat-surface);
    border: 1px solid var(--cf-cat-border);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cf-cat-muted);
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.cf-hero-bc a {
    color: var(--cf-cat-ink-2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cf-hero-bc a:hover {
    color: var(--cf-cat-accent);
}

.cf-hero-bc .sep {
    font-size: 10px;
    opacity: 0.55;
}

.cf-hero-bc .current {
    color: var(--cf-cat-accent);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cf-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 13px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cf-cat-accent) 10%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--cf-cat-accent) 26%, transparent);
    color: var(--cf-cat-accent);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.cf-hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cf-cat-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--cf-cat-accent) 20%, transparent);
}

.cf-cat-hero h1.category-page-title {
    margin: 0 0 10px;
    color: var(--cf-cat-ink);
    font-size: clamp(1.75rem, 3.5vw, 2.6rem);
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.cf-hero-title-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--cf-cat-accent) 14%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--cf-cat-accent) 25%, transparent);
    color: var(--cf-cat-accent);
    font-size: 20px;
    flex-shrink: 0;
}

.cf-hero-subtitle {
    margin: 0 0 20px;
    color: var(--cf-cat-muted);
    font-size: clamp(0.95rem, 1.35vw, 1.05rem);
    line-height: 1.6;
    max-width: 66ch;
}

.cf-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cf-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--cf-cat-border);
    background: var(--cf-cat-surface);
    color: var(--cf-cat-ink);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.cf-hero-btn:hover {
    transform: translateY(-1px);
    border-color: var(--cf-cat-accent);
    color: var(--cf-cat-accent);
}

.cf-hero-btn-primary {
    background: var(--cf-cat-accent);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--cf-cat-accent) 28%, transparent);
}

.cf-hero-btn-primary:hover {
    filter: brightness(0.94);
    background: var(--cf-cat-accent);
    color: #ffffff;
}

.cf-hero-btn .cf-count-pill {
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--cf-cat-surface-alt);
    color: var(--cf-cat-ink-2);
    font-size: 11px;
    font-weight: 800;
}

.cf-hero-btn-primary .cf-count-pill {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

/* Hero Sector Navigation Bar (Private, Govt, Foreign) */
.cf-hero-sector-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 16px;
}

.cf-hero-sector-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--cf-cat-surface);
    border: 1px solid var(--cf-cat-border);
    color: var(--cf-cat-ink);
    text-decoration: none;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.18s ease;
}

.cf-hero-sector-pill:hover {
    transform: translateY(-2px);
    border-color: var(--cf-cat-accent);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.cf-hero-sector-ico {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.cf-hero-sector-pill strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.cf-hero-sector-pill small {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--cf-cat-muted);
}

/* Sibling Subcategory Navigation */
.listing-sibling-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0 16px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.listing-sibling-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--cf-cat-surface);
    border: 1px solid var(--cf-cat-border);
    color: var(--cf-cat-ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.listing-sibling-chip:hover {
    border-color: var(--cf-cat-accent);
    color: var(--cf-cat-accent);
    background: var(--cf-cat-surface-alt);
}

.listing-sibling-chip.is-active {
    background: var(--cf-cat-accent);
    border-color: var(--cf-cat-accent);
    color: #ffffff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--cf-cat-accent) 25%, transparent);
}

.listing-sibling-chip.is-active .listing-sibling-cnt {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.listing-sibling-cnt {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--cf-cat-surface-alt);
    color: var(--cf-cat-muted);
}

/* Stat Cards in Hero */
.cf-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cf-stat-tile {
    padding: 15px 16px;
    border-radius: 16px;
    background: var(--cf-cat-surface);
    border: 1px solid var(--cf-cat-border);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.045);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.cf-stat-tile:hover {
    border-color: color-mix(in srgb, var(--cf-cat-accent) 36%, var(--cf-cat-border));
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.cf-stat-val {
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 850;
    color: var(--cf-cat-ink);
    line-height: 1.1;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cf-stat-val i {
    font-size: 0.95rem;
    color: var(--cf-cat-accent);
}

.cf-stat-lbl {
    font-size: 12px;
    font-weight: 600;
    color: var(--cf-cat-muted);
    letter-spacing: 0.02em;
}

@media (prefers-color-scheme: dark) {
    html:not([data-cf-theme="light"]) .cf-cat-hero {
        background:
            radial-gradient(circle at 86% 14%, color-mix(in srgb, var(--cf-cat-accent) 26%, transparent), transparent 44%),
            linear-gradient(135deg, #0b1120 0%, #111b33 55%, #192442 100%);
    }
    html:not([data-cf-theme="light"]) .cf-cat-hero::before {
        background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    }
    html:not([data-cf-theme="light"]) .cf-hero-eyebrow,
    html:not([data-cf-theme="light"]) .cf-hero-title-icon {
        background: color-mix(in srgb, var(--cf-cat-accent) 22%, #131b2e);
    }
}

html[data-cf-theme="dark"] .cf-cat-hero {
    background:
        radial-gradient(circle at 86% 14%, color-mix(in srgb, var(--cf-cat-accent) 26%, transparent), transparent 44%),
        linear-gradient(135deg, #0b1120 0%, #111b33 55%, #192442 100%);
}
html[data-cf-theme="dark"] .cf-cat-hero::before {
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
}
html[data-cf-theme="dark"] .cf-hero-eyebrow,
html[data-cf-theme="dark"] .cf-hero-title-icon {
    background: color-mix(in srgb, var(--cf-cat-accent) 22%, #131b2e);
}

/* ── Sub-Category Tracks Strip ── */
.cf-subtracks-wrap {
    margin: 20px auto 0;
}

.cf-subtracks-rail {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.cf-subtrack-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 12px;
    background: var(--cf-cat-surface);
    border: 1px solid var(--cf-cat-border);
    color: var(--cf-cat-ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.cf-subtrack-pill:hover {
    transform: translateY(-2px);
    border-color: var(--track-color, var(--cf-cat-accent));
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    color: var(--track-color, var(--cf-cat-accent));
}

.cf-subtrack-ico {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.cf-subtrack-cnt {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--cf-cat-muted);
}

.cf-track-cards-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.cf-track-cards-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 850;
    color: var(--cf-cat-ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cf-track-cards-head span {
    font-size: 12.5px;
    color: var(--cf-cat-muted);
    font-weight: 600;
}

.cf-track-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cf-track-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 16px;
    border-radius: 15px;
    background: var(--cf-cat-surface);
    border: 1px solid var(--cf-cat-border);
    color: var(--cf-cat-ink);
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.cf-track-card:hover {
    transform: translateY(-2px);
    border-color: var(--track-color, var(--cf-cat-accent));
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.cf-track-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cf-track-card-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.cf-track-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 850;
    color: var(--cf-cat-ink);
}

.cf-track-card-desc {
    margin: 0;
    font-size: 12.5px;
    color: var(--cf-cat-muted);
    line-height: 1.45;
}

.cf-track-card-cta {
    margin-top: auto;
    font-size: 12px;
    font-weight: 800;
    color: var(--track-color, var(--cf-cat-accent));
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 820px) {
    .cf-track-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Sticky Command & Filter Dock ── */
.cf-cat-dock-wrap {
    margin: 18px auto 22px;
    position: sticky;
    top: 8px;
    z-index: 30;
}

.cf-cat-dock {
    background: color-mix(in srgb, var(--cf-cat-surface) 92%, transparent);
    backdrop-filter: blur(14px);
    border: 1px solid var(--cf-cat-border);
    border-radius: 18px;
    padding: 14px;
    box-shadow: var(--cf-cat-shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cf-dock-row-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cf-dock-search {
    position: relative;
    flex: 1 1 260px;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--cf-cat-surface-alt);
    border: 1.5px solid var(--cf-cat-border);
    transition: border-color 0.18s, box-shadow 0.18s;
}

.cf-dock-search:focus-within {
    border-color: var(--cf-cat-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cf-cat-accent) 16%, transparent);
}

.cf-dock-search i {
    color: var(--cf-cat-muted);
    font-size: 14px;
}

.cf-dock-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--cf-cat-ink);
    font: inherit;
    font-size: 14px;
}

.cf-kbd-hint {
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid var(--cf-cat-border);
    background: var(--cf-cat-surface);
    color: var(--cf-cat-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    flex-shrink: 0;
}

.cf-dock-select {
    min-height: 44px;
    padding: 0 34px 0 13px;
    border-radius: 12px;
    border: 1.5px solid var(--cf-cat-border);
    background: var(--cf-cat-surface);
    color: var(--cf-cat-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.cf-dock-select:focus-visible {
    border-color: var(--cf-cat-accent);
}

.cf-dock-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--cf-cat-accent);
    color: #ffffff;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.18s, transform 0.15s;
}

.cf-dock-submit:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
}

.cf-dock-row-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--cf-cat-border);
}

.cf-deadline-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cf-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 33px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--cf-cat-border);
    background: var(--cf-cat-surface-alt);
    color: var(--cf-cat-ink-2);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.16s ease;
}

.cf-pill-btn:hover {
    border-color: var(--cf-cat-accent);
    color: var(--cf-cat-accent);
}

.cf-pill-btn.is-active {
    background: var(--cf-cat-accent);
    border-color: var(--cf-cat-accent);
    color: #ffffff;
}

.cf-dock-right-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

.cf-saved-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1.5px solid var(--cf-cat-border);
    background: var(--cf-cat-surface);
    color: var(--cf-cat-ink-2);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
}

.cf-saved-toggle.is-active {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.cf-view-switch {
    display: inline-flex;
    background: var(--cf-cat-surface-alt);
    border: 1px solid var(--cf-cat-border);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.cf-view-btn {
    border: 0;
    background: transparent;
    color: var(--cf-cat-muted);
    width: 32px;
    height: 28px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s ease;
}

.cf-view-btn.is-active {
    background: var(--cf-cat-surface);
    color: var(--cf-cat-accent);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.cf-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--cf-cat-border);
    background: var(--cf-cat-surface);
    color: var(--cf-cat-ink-2);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.cf-clear-btn:hover {
    border-color: var(--cf-cat-accent);
    color: var(--cf-cat-accent);
}

/* ── Featured Spotlight Carousel ── */
.cf-spotlight {
    position: relative;
    margin-bottom: 28px;
}

.cf-spotlight-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.cf-spotlight-title {
    margin: 0;
    font-size: clamp(1.05rem, 1.8vw, 1.28rem);
    font-weight: 800;
    color: var(--cf-cat-ink);
    display: flex;
    align-items: center;
    gap: 9px;
}

.cf-spotlight-title i {
    color: var(--cf-cat-accent);
}

.cf-spotlight-nav {
    display: inline-flex;
    gap: 8px;
}

.cf-spotlight-nav button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--cf-cat-border);
    background: var(--cf-cat-surface);
    color: var(--cf-cat-ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.cf-spotlight-nav button:hover {
    background: var(--cf-cat-accent);
    border-color: var(--cf-cat-accent);
    color: #ffffff;
}

.cf-spotlight-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 6px;
}

.cf-spotlight-track::-webkit-scrollbar {
    display: none;
}

.cf-spot-card {
    flex: 0 0 calc(86% - 8px);
    height: 205px;
    border-radius: 16px;
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--cf-cat-shadow);
    display: block;
}

@media (min-width: 768px) {
    .cf-spot-card {
        flex: 0 0 calc(33.333% - 11px);
        height: 215px;
    }
}

.cf-spot-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.cf-spot-card:hover .cf-spot-bg {
    transform: scale(1.06);
}

.cf-spot-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.9) 100%);
    z-index: 1;
}

.cf-spot-body {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
}

.cf-spot-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cf-spot-pill {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
}

.cf-spot-pill-funded {
    background: #10b981;
    color: #ffffff;
}

.cf-spot-pill-urgent {
    background: #ef4444;
    color: #ffffff;
}

.cf-spot-pill-soon {
    background: #f59e0b;
    color: #111827;
}

.cf-spot-pill-new {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.cf-spot-card h3 {
    margin: 0 0 8px;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cf-spot-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 600;
}

/* ── Section Header Upgrade ── */
.cf-sec-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid color-mix(in srgb, var(--cf-cat-accent) 45%, var(--cf-cat-border));
}

.cf-sec-bar h2 {
    margin: 0;
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    font-weight: 800;
    color: var(--cf-cat-ink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cf-sec-page {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--cf-cat-muted);
    background: var(--cf-cat-surface);
    border: 1px solid var(--cf-cat-border);
    padding: 5px 12px;
    border-radius: 999px;
}

/* ── Upgraded Opportunity Cards (Grid & List modes) ── */
.cf-opp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}

.cf-opp-grid.is-list {
    grid-template-columns: minmax(0, 1fr);
}

.cf-opp-card {
    background: var(--cf-cat-surface);
    border: 1px solid var(--cf-cat-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--cf-cat-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.cf-opp-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--cf-cat-shadow-hover);
    border-color: color-mix(in srgb, var(--cf-cat-accent) 42%, var(--cf-cat-border));
}

.cf-opp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 16px 0;
}

.cf-opp-card .cf-cat-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(214, 40, 40, .11);
    color: var(--cf-cat-accent);
}

.cf-opp-card-top .cf-icon-btn {
    background: var(--cf-cat-surface-alt, #f8fafc);
    border: 1px solid var(--cf-cat-border, #e2e8f0);
    color: var(--cf-cat-text-muted, #64748b);
    backdrop-filter: none;
}

.cf-opp-card-top .cf-icon-btn:hover {
    color: var(--cf-cat-accent);
    border-color: var(--cf-cat-accent);
    background: rgba(214, 40, 40, 0.08);
}

.cf-opp-card-top .cf-icon-btn.is-saved {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff;
}

.cf-opp-grid.is-list .cf-opp-card {
    flex-direction: column;
}

.cf-opp-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--cf-cat-surface-alt);
    overflow: hidden;
    flex-shrink: 0;
}

.cf-opp-grid.is-list .cf-opp-media {
    aspect-ratio: auto;
    width: 210px;
    min-height: 152px;
}

.cf-opp-media a {
    display: block;
    width: 100%;
    height: 100%;
}

.cf-opp-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.cf-opp-card:hover .cf-opp-media img {
    transform: scale(1.05);
}

.cf-opp-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--cf-cat-accent) 18%, transparent), color-mix(in srgb, var(--cf-cat-accent) 4%, transparent));
    color: var(--cf-cat-accent);
}

.cf-opp-media-top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
}

.cf-opp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.cf-status-pill {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.cf-status-funded {
    background: #10b981;
    color: #ffffff;
}

.cf-status-urgent {
    background: #ef4444;
    color: #ffffff;
}

.cf-status-soon {
    background: #f59e0b;
    color: #111827;
}

.cf-status-open {
    background: rgba(15, 23, 42, 0.78);
    color: #f8fafc;
    backdrop-filter: blur(6px);
}

.cf-status-expired {
    background: #475569;
    color: #f1f5f9;
}

.cf-opp-quickbtns {
    display: flex;
    gap: 6px;
    pointer-events: auto;
}

.cf-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: transform 0.15s, background 0.15s;
}

.cf-icon-btn:hover {
    transform: scale(1.06);
    background: var(--cf-cat-accent);
    border-color: transparent;
}

.cf-icon-btn.is-saved {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #111827;
}

.cf-opp-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
    min-width: 0;
}

.cf-opp-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.38;
}

.cf-opp-title a {
    color: var(--cf-cat-ink);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cf-opp-title a:hover {
    color: var(--cf-cat-accent);
}

.cf-opp-excerpt {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--cf-cat-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cf-opp-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--cf-cat-muted);
    font-weight: 600;
    margin-top: auto;
}

.cf-opp-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cf-meta-deadline {
    color: var(--cf-cat-accent);
    font-weight: 700;
}

.cf-opp-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 11px;
    border-top: 1px solid var(--cf-cat-border);
}

.cf-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid var(--cf-cat-border);
    background: var(--cf-cat-surface-alt);
    color: var(--cf-cat-ink-2);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
}

.cf-preview-btn:hover {
    border-color: var(--cf-cat-accent);
    color: var(--cf-cat-accent);
}

.cf-open-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--cf-cat-accent) 12%, transparent);
    color: var(--cf-cat-accent);
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.16s ease;
}

.cf-open-link:hover {
    background: var(--cf-cat-accent);
    color: #ffffff;
}

/* ── Cross-Hub Explorer Strip ── */
.cf-cross-hubs {
    margin-top: 30px;
    padding: 20px;
    border-radius: 18px;
    background: var(--cf-cat-surface);
    border: 1px solid var(--cf-cat-border);
    box-shadow: var(--cf-cat-shadow);
}

.cf-cross-hubs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.cf-cross-hubs-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--cf-cat-ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cf-cross-hubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 10px;
}

.cf-hub-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid var(--cf-cat-border);
    background: var(--cf-cat-surface-alt);
    color: var(--cf-cat-ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.16s, border-color 0.16s, color 0.16s;
}

.cf-hub-link:hover {
    transform: translateY(-2px);
    border-color: var(--cf-cat-accent);
    color: var(--cf-cat-accent);
}

.cf-hub-link i {
    color: var(--cf-cat-accent);
    width: 18px;
    text-align: center;
}

/* ── Quick Preview Modal ── */
dialog.cf-preview-dialog {
    width: min(92vw, 640px);
    margin: auto;
    border: 1px solid var(--cf-cat-border);
    border-radius: 20px;
    background: var(--cf-cat-surface);
    color: var(--cf-cat-ink);
    padding: 0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

dialog.cf-preview-dialog::backdrop {
    background: rgba(10, 15, 28, 0.72);
    backdrop-filter: blur(5px);
}

.cf-modal-hd {
    padding: 18px 22px;
    border-bottom: 1px solid var(--cf-cat-border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cf-modal-hd h3 {
    margin: 6px 0 0;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.35;
}

.cf-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--cf-cat-border);
    background: var(--cf-cat-surface-alt);
    color: var(--cf-cat-ink);
    cursor: pointer;
    flex-shrink: 0;
}

.cf-modal-bd {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cf-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cf-cat-muted);
}

.cf-modal-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--cf-cat-ink-2);
    white-space: pre-line;
}

.cf-modal-ft {
    padding: 14px 22px 18px;
    border-top: 1px solid var(--cf-cat-border);
    background: var(--cf-cat-surface-alt);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.cf-modal-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 11px;
    background: var(--cf-cat-accent);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
}

.cf-modal-cta:hover {
    color: #ffffff;
    filter: brightness(0.92);
}

/* ── Toast & Prompt Card Dark-Mode Compatibility ── */
.cf-hero-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 18px;
}

.cf-hero-tags-label {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--cf-cat-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 2px;
}

.cf-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--cf-cat-border);
    background: var(--cf-cat-surface);
    color: var(--cf-cat-ink-2);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
    transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.cf-tag-chip:hover {
    border-color: var(--cf-cat-accent);
    color: var(--cf-cat-accent);
    background: color-mix(in srgb, var(--cf-cat-accent) 7%, var(--cf-cat-surface));
    transform: translateY(-1px);
}

.cf-cat-faq {
    margin-top: 26px;
    padding: 22px 24px;
    border-radius: 18px;
    background: var(--cf-cat-surface);
    border: 1px solid var(--cf-cat-border);
    box-shadow: var(--cf-cat-shadow);
}

.cf-cat-faq-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.cf-cat-faq-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--cf-cat-ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cf-faq-list {
    display: grid;
    gap: 10px;
}

.cf-faq-item {
    border: 1px solid var(--cf-cat-border);
    border-radius: 12px;
    background: var(--cf-cat-bg);
    overflow: hidden;
    transition: border-color 0.18s ease;
}

.cf-faq-item[open] {
    border-color: color-mix(in srgb, var(--cf-cat-accent) 42%, var(--cf-cat-border));
}

.cf-faq-item summary {
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--cf-cat-ink);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cf-faq-item summary::-webkit-details-marker {
    display: none;
}

.cf-faq-item summary::after {
    content: '+';
    font-size: 18px;
    font-weight: 600;
    color: var(--cf-cat-accent);
    line-height: 1;
    flex-shrink: 0;
}

.cf-faq-item[open] summary::after {
    content: '−';
}

.cf-faq-item p {
    margin: 0;
    padding: 0 16px 14px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--cf-cat-muted);
}

.cf-toast {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 9999;
    padding: 11px 16px;
    border-radius: 12px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cf-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

html[data-cf-theme="dark"] .cf-topic-chip,
html[data-cf-theme="dark"] .cf-pcard {
    background: var(--cf-cat-surface);
    border-color: var(--cf-cat-border);
    color: var(--cf-cat-ink);
}

html[data-cf-theme="dark"] .cf-pcard-title a {
    color: var(--cf-cat-ink);
}

html[data-cf-theme="dark"] .cf-pcard-preview {
    background: var(--cf-cat-surface-alt);
    border-color: var(--cf-cat-border);
    color: var(--cf-cat-ink-2);
}

html[data-cf-theme="dark"] .cf-pcard-foot {
    border-color: var(--cf-cat-border);
}

html[data-cf-theme="dark"] .empty {
    background: var(--cf-cat-surface);
    border: 1px solid var(--cf-cat-border);
    color: var(--cf-cat-muted);
    border-radius: 16px;
}

/* ── Responsive Breakpoints ── */
@media (max-width: 991px) {
    .cf-cat-hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }
    .cf-hero-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .cf-cat-dock-wrap {
        position: static;
    }
}

@media (max-width: 767px) {
    .cf-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .cf-opp-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .cf-opp-grid.is-list .cf-opp-card {
        flex-direction: column;
    }
    .cf-opp-grid.is-list .cf-opp-media {
        width: 100%;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }
    .cf-spotlight-nav {
        display: none;
    }
    .cf-dock-row-main > * {
        width: 100%;
    }
    .cf-dock-select {
        flex: 1 1 46%;
        width: auto;
    }
}
