/*
 * Simplified navigation, opportunity feed, saved list and member next steps.
 * Built on the brand tokens in brand-system.css (single dark theme).
 */

/* ---------- Header groups (desktop) ---------- */
.skx-nav-group > summary::-webkit-details-marker { display: none; }
.skx-nav-menu {
    position: absolute; left: 0; top: 3.25rem; z-index: 60;
    width: 20rem; padding: .5rem;
    background: var(--brand-panel, #0f172a);
    border: 1px solid var(--brand-line, #283453);
    border-radius: 14px; box-shadow: 0 20px 40px #0008;
}
.skx-nav-item {
    display: flex; gap: .75rem; align-items: flex-start;
    padding: .65rem .75rem; border-radius: 10px;
    color: var(--brand-ink, #f1f5f9); text-decoration: none;
}
.skx-nav-item:hover, .skx-nav-item:focus-visible { background: var(--brand-raised, #141b34); }
.skx-nav-item i { width: 1.25rem; margin-top: .2rem; color: var(--brand-purple, #a78bfa); text-align: center; }
.skx-nav-item strong { display: block; font-size: .9rem; font-weight: 600; }
.skx-nav-item small { display: block; font-size: .78rem; color: var(--brand-muted, #b1bdd2); }

/* ---------- Mobile drawer groups ---------- */
.skx-mobile-group > summary { list-style: none; cursor: pointer; }
.skx-mobile-group > summary::-webkit-details-marker { display: none; }
.skx-mobile-group[open] > summary .fa-chevron-down { transform: rotate(180deg); }
.skx-mobile-items { padding-left: 2.25rem; }

/* ---------- Phone tab bar ---------- */
.skx-tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 45;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--brand-bg, #020617) 94%, transparent);
    border-top: 1px solid var(--brand-line, #283453);
    backdrop-filter: blur(12px);
}
.skx-tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: .2rem;
    min-height: 48px; padding: .3rem 0; border-radius: 10px;
    font-size: .7rem; font-weight: 600; color: var(--brand-muted, #b1bdd2); text-decoration: none;
}
.skx-tabbar a i { font-size: 1.05rem; }
.skx-tabbar a.is-active { color: var(--brand-purple, #a78bfa); font-weight: 700; }
.skx-tabbar a.is-active i { color: var(--brand-purple, #a78bfa); }
@media (max-width: 1023px) {
    body.marketplace-app { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}
@media (min-width: 1024px) { .skx-tabbar { display: none; } }

/* ---------- Page scaffolding ---------- */
.skx-page { max-width: 64rem; margin: 0 auto; padding: 2rem 1rem 3rem; color: var(--brand-ink, #f1f5f9); }
@media (min-width: 640px) { .skx-page { padding: 2.5rem 1.5rem 4rem; } }
.skx-heading { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.skx-heading h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.15; font-weight: 800; margin: .25rem 0 .5rem; }
.skx-heading p { color: var(--brand-muted, #b1bdd2); max-width: 40rem; font-size: 1rem; line-height: 1.6; }
.skx-eyebrow { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--brand-purple, #a78bfa); }
.skx-link { color: var(--brand-purple, #a78bfa); font-weight: 600; text-decoration: none; white-space: nowrap; }
.skx-link:hover { color: var(--brand-ink, #f8fafc); }
.skx-hint { margin: .5rem 0 0; font-size: .85rem; color: var(--brand-muted, #b1bdd2); }
.skx-hint a { color: var(--brand-purple, #a78bfa); }
.skx-note { margin-top: 1.5rem; font-size: .85rem; line-height: 1.6; color: var(--brand-muted, #b1bdd2); }

.skx-button {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 48px; padding: .7rem 1.25rem; border: 0; border-radius: 12px;
    background: var(--brand-gradient, linear-gradient(110deg, #6366f1, #a855f7 55%, #ec4899));
    color: #fff; font-weight: 700; text-decoration: none; cursor: pointer;
}
.skx-button-small { min-height: 42px; padding: .5rem 1rem; font-size: .9rem; }

/* ---------- Filters ---------- */
.skx-filters { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .skx-filters { grid-template-columns: 1fr 15rem auto; align-items: end; } }
.skx-search, .skx-country { display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; color: var(--brand-muted, #b1bdd2); }
.skx-search { position: relative; justify-content: flex-end; }
.skx-search i { position: absolute; left: 1rem; bottom: 1rem; color: var(--brand-muted, #b1bdd2); }
.skx-search input, .skx-country select {
    width: 100%; min-height: 48px; border-radius: 12px; font-size: 1rem;
    background: var(--brand-panel, #0f172a); color: var(--brand-ink, #f1f5f9);
    border: 1px solid var(--brand-line, #283453); padding: .7rem 1rem;
}
.skx-search input { padding-left: 2.6rem; }
.skx-search input:focus, .skx-country select:focus { outline: 2px solid var(--brand-purple, #a78bfa); outline-offset: 1px; }

.skx-chips, .skx-tabs { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 0; margin-top: 1rem; scrollbar-width: none; }
.skx-chips::-webkit-scrollbar, .skx-tabs::-webkit-scrollbar { display: none; }
.skx-chips a, .skx-tabs a {
    flex: none; min-height: 40px; display: inline-flex; align-items: center;
    padding: .45rem .95rem; border-radius: 999px; text-decoration: none; font-size: .9rem; font-weight: 600;
    color: var(--brand-ink, #f1f5f9); border: 1px solid var(--brand-line, #283453); background: transparent;
}
.skx-chips a.is-active { background: var(--brand-raised, #141b34); border-color: var(--brand-purple, #a78bfa); }
.skx-tabs { border-bottom: 1px solid var(--brand-line, #283453); gap: 0; padding-bottom: 0; }
.skx-tabs a { border: 0; border-radius: 0; border-bottom: 2px solid transparent; color: var(--brand-muted, #b1bdd2); padding: .6rem .9rem; }
.skx-tabs a.is-active { color: var(--brand-ink, #f8fafc); border-bottom-color: var(--brand-purple, #a78bfa); }

.skx-results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; margin: 1.25rem 0 .75rem; font-size: .9rem; color: var(--brand-muted, #b1bdd2); }
.skx-results-bar strong { color: var(--brand-ink, #f1f5f9); }
.skx-new { color: #6ee7b7; font-weight: 600; }

/* ---------- Cards ---------- */
.skx-list { display: grid; gap: .9rem; }
.skx-card {
    padding: 1.15rem 1.15rem 1rem; border-radius: 16px;
    background: var(--brand-panel, #0f172a); border: 1px solid var(--brand-line, #283453);
}
.skx-card:hover { border-color: #3d4a6b; }
.skx-card-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .8rem; color: var(--brand-muted, #b1bdd2); }
.skx-badge { padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--brand-raised, #141b34); color: var(--brand-ink, #f1f5f9); }
.skx-badge-new { background: #064e3b; color: #a7f3d0; }
.skx-badge-old { background: #3f2d14; color: #fcd9a6; }
.skx-card h2 { margin: .55rem 0 .35rem; font-size: 1.12rem; line-height: 1.4; font-weight: 700; }
.skx-card h2 a { color: var(--brand-ink, #f1f5f9); text-decoration: none; }
.skx-card h2 a:hover { text-decoration: underline; }
.skx-card h2 i { font-size: .75rem; color: var(--brand-muted, #b1bdd2); }
.skx-pay { margin: 0 0 .35rem; font-weight: 700; color: #c4b5fd; }
.skx-summary { margin: 0 0 .5rem; color: var(--brand-muted, #b1bdd2); font-size: .93rem; line-height: 1.6; }
.skx-facts { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .82rem; color: var(--brand-muted, #b1bdd2); margin: 0 0 .85rem; }
.skx-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.skx-actions form { margin: 0; }
.skx-save {
    display: inline-flex; align-items: center; gap: .4rem; min-height: 42px; padding: .5rem .95rem;
    border-radius: 12px; border: 1px solid var(--brand-line, #283453); background: transparent;
    color: var(--brand-ink, #f1f5f9); font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer;
}
.skx-save.is-saved { border-color: var(--brand-purple, #a78bfa); color: #ddd6fe; }

.skx-empty { padding: 2rem 1.25rem; border-radius: 16px; text-align: center; border: 1px dashed var(--brand-line, #283453); }
.skx-empty h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.skx-empty p { color: var(--brand-muted, #b1bdd2); max-width: 34rem; margin: 0 auto 1rem; line-height: 1.6; }
.skx-pagination { margin-top: 1.25rem; }

/* ---------- Alternatives ---------- */
.skx-alternatives { margin-top: 2rem; }
.skx-alternatives h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: .75rem; }
.skx-alt-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.skx-alt {
    display: flex; flex-direction: column; gap: .3rem; padding: 1rem; border-radius: 14px; text-decoration: none;
    background: var(--brand-raised, #141b34); border: 1px solid var(--brand-line, #283453); color: var(--brand-ink, #f1f5f9);
}
.skx-alt:hover { border-color: var(--brand-purple, #a78bfa); }
.skx-alt i { color: var(--brand-purple, #a78bfa); font-size: 1.1rem; }
.skx-alt span { font-size: .85rem; color: var(--brand-muted, #b1bdd2); line-height: 1.5; }

/* ---------- Dashboard next steps ---------- */
.skx-dash-grid { display: grid; gap: 1rem; margin: 1.25rem 0; }
@media (min-width: 900px) { .skx-dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.skx-panel { padding: 1.25rem; border-radius: 16px; background: var(--brand-panel, #0f172a); border: 1px solid var(--brand-line, #283453); }
.skx-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .75rem; }
.skx-panel-head h2 { font-size: 1.1rem; font-weight: 700; }
.skx-progress-label { font-size: .82rem; color: var(--brand-muted, #b1bdd2); }
.skx-progress { height: 6px; border-radius: 999px; background: var(--brand-raised, #141b34); overflow: hidden; margin-bottom: .75rem; }
.skx-progress span { display: block; height: 100%; background: var(--brand-gradient, #8b5cf6); }
.skx-steps, .skx-ways { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.skx-steps li, .skx-ways li { display: flex; gap: .75rem; align-items: flex-start; }
.skx-steps li > i { margin-top: .9rem; color: var(--brand-muted, #b1bdd2); }
.skx-steps li.is-done > i { color: #6ee7b7; }
.skx-steps a, .skx-steps span, .skx-ways a {
    flex: 1; display: block; padding: .6rem .5rem; border-radius: 10px; color: var(--brand-ink, #f1f5f9); text-decoration: none;
}
.skx-steps a:hover, .skx-ways a:hover { background: var(--brand-raised, #141b34); }
.skx-steps strong, .skx-ways strong { display: block; font-size: .93rem; }
.skx-steps small, .skx-ways small { display: block; font-size: .82rem; color: var(--brand-muted, #b1bdd2); line-height: 1.5; }
.skx-steps li.is-done strong { color: var(--brand-muted, #b1bdd2); text-decoration: line-through; }
.skx-ways a { display: flex; gap: .75rem; }
.skx-ways a i { flex: none; margin-top: .2rem; color: var(--brand-purple, #a78bfa); width: 1.25rem; text-align: center; }

/* ---------- Landing hero buttons ---------- */
@media (min-width: 640px) { .skx-hero-ctas { flex-wrap: wrap; } }

/* ---------- Phone action bar on detail pages ---------- */
.skx-actionbar {
    position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 44;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .6rem 1rem; background: var(--brand-panel, #0f172a); border-top: 1px solid var(--brand-line, #283453);
}
.skx-actionbar .skx-button { flex: 1; max-width: 22rem; margin-left: auto; }
.skx-actionbar-note { font-weight: 700; color: #c4b5fd; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1023px) { body.marketplace-app:has(.skx-actionbar) { padding-bottom: calc(128px + env(safe-area-inset-bottom)); } }
.skx-badge-featured { background: #3b2a6b; color: #ddd6fe; }
