/* ==========================================================================
   Devsly — Ultra-Compact 3-Column Living Community Workspace (pages/home.php)
   Design principles:
     - Full-screen width efficiency (max 1480px, tight 14px gutters, zero dead margins)
     - Single unified hairline-divided stream (GitHub / Linear / Peerlist craft)
     - Zero duplicate navigation bars, zero marketing prose, <1s scannability
     - Brand hue locked to 210deg (#0066cc), 1 solid primary CTA (Von Restorff)
     - Native light & dark surfaces, >=4.5:1 WCAG AA contrast, tabular-nums
     - Zero hover-lift, zero blink/pulse, full prefers-reduced-motion, 0px overflow
   ========================================================================== */

.hap-root {
    --hap-bg: #f5f7fa;
    --hap-surface: #ffffff;
    --hap-surface-2: #f8fafc;
    --hap-surface-3: #eef2f7;
    --hap-ink: #111827;
    --hap-ink-2: #3f4d63;
    --hap-ink-3: #5b6980;
    --hap-line: rgba(17, 24, 39, 0.09);
    --hap-line-2: rgba(17, 24, 39, 0.15);
    --hap-line-strong: #8796ab;
    --hap-accent: #0066cc;
    --hap-accent-hover: #0052a3;
    --hap-accent-soft: #eaf2fc;
    --hap-good: #047857;
    --hap-good-bg: rgba(4, 120, 87, 0.08);
    --hap-good-line: rgba(4, 120, 87, 0.28);
    --hap-fair: #92400e;
    --hap-fair-bg: rgba(180, 83, 9, 0.09);
    --hap-fair-line: rgba(180, 83, 9, 0.28);
    --hap-poor: #b91c1c;
    --hap-poor-bg: rgba(185, 28, 28, 0.08);
    --hap-poor-line: rgba(185, 28, 28, 0.28);

    background: var(--hap-bg);
    color: var(--hap-ink);
    min-height: calc(100vh - 92px);
    padding: 12px 0 72px;
}

[data-theme="dark"] .hap-root {
    --hap-bg: #0b111e;
    --hap-surface: #111929;
    --hap-surface-2: #162135;
    --hap-surface-3: #1d2b44;
    --hap-ink: #f1f5f9;
    --hap-ink-2: #c8d5e8;
    --hap-ink-3: #93a6c2;
    --hap-line: rgba(232, 238, 252, 0.09);
    --hap-line-2: rgba(232, 238, 252, 0.16);
    --hap-line-strong: #5c6e8a;
    --hap-accent: #6cb0f5;
    --hap-accent-hover: #93c5fd;
    --hap-accent-soft: rgba(108, 176, 245, 0.14);
    --hap-good: #34d399;
    --hap-good-bg: rgba(52, 211, 153, 0.11);
    --hap-good-line: rgba(52, 211, 153, 0.32);
    --hap-fair: #fbbf24;
    --hap-fair-bg: rgba(251, 191, 36, 0.11);
    --hap-fair-line: rgba(251, 191, 36, 0.32);
    --hap-poor: #f87171;
    --hap-poor-bg: rgba(248, 113, 113, 0.11);
    --hap-poor-line: rgba(248, 113, 113, 0.32);
}

/* Full-screen efficient container */
.hap-shell {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (max-width: 639px) {
    .hap-root {
        padding: 8px 0 64px;
    }
    .hap-shell {
        padding: 0 10px;
    }
}

/* 3-Column Living Workspace Grid */
.hap-grid {
    display: grid;
    grid-template-columns: 204px minmax(0, 1fr) 292px;
    gap: 14px;
    align-items: start;
}

@media (max-width: 1300px) {
    .hap-grid {
        grid-template-columns: 194px minmax(0, 1fr) 276px;
        gap: 12px;
    }
}

@media (max-width: 1120px) {
    .hap-grid {
        grid-template-columns: 194px minmax(0, 1fr);
    }
    .hap-right {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        position: static;
    }
}

@media (max-width: 860px) {
    .hap-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .hap-right {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ==========================================================================
   COLUMN 1: LEFT STICKY RAIL (Single Unified Minimal Card + 1 Primary CTA)
   ========================================================================== */

.hap-left {
    position: sticky;
    top: 72px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.hap-nav-card {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface);
}

.hap-nav-grp-lbl {
    padding: 5px 8px 3px;
    font-size: 10.5px;
    line-height: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hap-ink-3);
}

.hap-nav-divider {
    height: 1px;
    margin: 6px 6px;
    background: var(--hap-line);
    border: 0;
}

.hap-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 32px;
    padding: 0 8px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--hap-ink-2);
    font-family: inherit;
    font-size: 13px;
    line-height: 18px;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 100ms cubic-bezier(0.2, 0, 0, 1),
                color 100ms cubic-bezier(0.2, 0, 0, 1);
}

.hap-nav-btn i {
    width: 15px;
    text-align: center;
    font-size: 12.5px;
    color: var(--hap-ink-3);
    flex: none;
}

.hap-nav-btn:hover {
    background: var(--hap-surface-2);
    color: var(--hap-ink);
}

.hap-nav-btn.is-active {
    background: var(--hap-accent-soft);
    color: var(--hap-accent);
    font-weight: 600;
}

.hap-nav-btn.is-active i {
    color: var(--hap-accent);
}

.hap-nav-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hap-nav-badge {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10.5px;
    line-height: 15px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--hap-surface-3);
    color: var(--hap-ink-3);
    font-variant-numeric: tabular-nums;
}

.hap-nav-btn.is-active .hap-nav-badge {
    background: rgba(0, 102, 204, 0.14);
    color: var(--hap-accent);
}

.hap-nav-badge.is-gold {
    background: var(--hap-fair-bg);
    color: var(--hap-fair);
}

/* Strictly ONE solid #0066cc primary CTA in viewport (Von Restorff Law #1) */
.hap-primary-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid #0066cc;
    background: #0066cc;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 100ms cubic-bezier(0.2, 0, 0, 1);
}

.hap-primary-cta:hover {
    background: #0052a3;
    border-color: #0052a3;
    color: #ffffff;
}

/* Mobile horizontal pill switcher (Left Rail collapses cleanly) */
@media (max-width: 860px) {
    .hap-left {
        position: static;
        gap: 0;
    }
    .hap-left-extra,
    .hap-left-cta-wrap {
        display: none;
    }
    .hap-nav-card {
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 6px;
        gap: 5px;
    }
    .hap-nav-card::-webkit-scrollbar {
        display: none;
    }
    .hap-nav-card .hap-nav-grp-lbl,
    .hap-nav-card .hap-nav-divider {
        display: none;
    }
    .hap-nav-btn {
        width: auto;
        flex: none;
        white-space: nowrap;
        min-height: 36px;
        padding: 0 10px;
        border: 1px solid var(--hap-line);
    }
    .hap-nav-btn.is-active {
        border-color: var(--hap-accent);
    }
}

/* ==========================================================================
   COLUMN 2: CENTER ULTRA-CLEAN HIGH-DENSITY STREAM
   ========================================================================== */

.hap-center {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

/* Single Unified Command Bar (Title + Live Pulse + Search + Agent Filter) */
.hap-topbar {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hap-topbar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.hap-h1 {
    margin: 0;
    font-size: 15px;
    line-height: 20px;
    letter-spacing: -0.012em;
    font-weight: 600;
    color: var(--hap-ink);
}

.hap-live-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 12px;
    line-height: 16px;
    color: var(--hap-ink-3);
    font-variant-numeric: tabular-nums;
}

.hap-live-meta strong {
    color: var(--hap-ink);
    font-weight: 600;
}

/* Light/Dark theme-native unified omnibox */
.hap-topbar .quick-search {
    max-width: none;
    width: 100%;
}

.hap-topbar .hero-cmd .search-box {
    background: var(--hap-surface-2);
    border: 1px solid var(--hap-line-strong);
    border-radius: 8px;
}

.hap-topbar .hero-cmd:focus-within .search-box {
    border-color: var(--hap-accent);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.hap-topbar .hero-cmd-icon {
    color: var(--hap-ink-3);
    padding: 0 6px 0 11px;
    font-size: 13px;
}

.hap-topbar .quick-search .search-input {
    height: 38px;
    color: var(--hap-ink);
    font-size: 14px;
}

.hap-topbar .quick-search .search-input::placeholder {
    color: var(--hap-ink-3);
}

.hap-topbar .hero-kbd {
    background: var(--hap-surface);
    border-color: var(--hap-line-2);
    color: var(--hap-ink-3);
    font-size: 11px;
    padding: 2px 5px;
}

.hap-topbar .hero-cmd-go {
    width: 30px;
    height: 30px;
    background: var(--hap-surface-3);
    color: var(--hap-ink);
    border-radius: 6px;
}

.hap-topbar .hero-cmd-go:hover {
    background: var(--hap-accent);
    color: #ffffff;
}

.hap-topbar .quick-search .search-results {
    background: var(--hap-surface);
    border: 1px solid var(--hap-line-2);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}

[data-theme="dark"] .hap-topbar .quick-search .search-results {
    box-shadow: 0 16px 32px rgba(2, 8, 20, 0.55);
}

.hap-topbar .quick-search .search-category {
    background: var(--hap-surface);
    color: var(--hap-ink-3);
}

.hap-topbar .quick-search .search-result-name {
    color: var(--hap-ink);
}

.hap-topbar .quick-search .search-result-desc,
.hap-topbar .quick-search .search-result-meta {
    color: var(--hap-ink-2);
}

.hap-topbar .quick-search .search-result-icon,
.hap-topbar .quick-search .search-result-avatar {
    background: var(--hap-surface-2);
    border-color: var(--hap-line);
    color: var(--hap-accent);
}

.hap-topbar .quick-search .search-result-item:hover,
.hap-topbar .quick-search .search-result-item.is-kbd-focus {
    background: var(--hap-accent-soft);
}

.hap-topbar .quick-search .search-result-skill-jump {
    background: var(--hap-accent-soft);
    border-color: rgba(0, 102, 204, 0.26);
}

/* Inline Agent Filter Strip (lives cleanly inside topbar, zero duplicate tabs) */
.hap-agent-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.hap-agent-bar[hidden] {
    display: none;
}

.hap-agent-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
    width: 100%;
}

@media (max-width: 639px) {
    .hap-agent-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 1px;
    }
    .hap-agent-pills::-webkit-scrollbar {
        display: none;
    }
    .hap-agent-chip {
        flex: none;
        white-space: nowrap;
    }
}

.hap-agent-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 27px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    color: var(--hap-ink-2);
    font-family: inherit;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 100ms ease, background-color 100ms ease, color 100ms ease;
}

.hap-agent-chip svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex: none;
}

.hap-agent-chip i {
    font-size: 11px;
    color: var(--hap-fair);
    flex: none;
}

.hap-agent-chip.is-active i {
    color: inherit;
}

.hap-agent-chip:hover {
    border-color: var(--hap-line-strong);
    color: var(--hap-ink);
}

/* Neutral ink active state so #0066cc stays singular for the primary CTA */
.hap-agent-chip.is-active {
    background: var(--hap-ink);
    border-color: var(--hap-ink);
    color: var(--hap-surface);
    font-weight: 600;
}

/* Stream Panes */
.hap-pane {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.hap-pane[hidden] {
    display: none;
}

/* ---------- Razor-Slim Quick Tools Strip (Zero Truncation, 1-Line Tiles) ---------- */

.hap-tools-dock {
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.hap-dock-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hap-dock-title {
    margin: 0;
    font-size: 11px;
    line-height: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hap-ink-3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hap-dock-more {
    border: none;
    background: transparent;
    padding: 0;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--hap-accent);
    cursor: pointer;
    white-space: nowrap;
    flex: none;
}

.hap-dock-more:hover {
    text-decoration: underline;
}

.hap-dock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

@media (max-width: 560px) {
    .hap-dock-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.hap-dock-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 4px 9px;
    border-radius: 7px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: border-color 100ms ease;
}

.hap-dock-item:hover {
    border-color: var(--hap-accent);
}

.hap-dock-item.is-featured {
    border-color: var(--hap-fair-line);
    background: var(--hap-fair-bg);
}

.hap-dock-item.is-new {
    border-color: var(--hap-good-line);
    background: var(--hap-good-bg);
}

.hap-dock-ic {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--hap-surface);
    border: 1px solid var(--hap-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--hap-accent);
    font-size: 11.5px;
    flex: none;
}

.hap-dock-item.is-featured .hap-dock-ic {
    color: var(--hap-fair);
}

.hap-dock-item.is-new .hap-dock-ic {
    color: var(--hap-good);
}

.hap-dock-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 17px;
    font-weight: 600;
    color: var(--hap-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hap-mini-tag {
    flex: none;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hap-mini-tag.is-feat {
    background: #b45309;
    color: #ffffff;
}

.hap-mini-tag.is-new {
    background: #047857;
    color: #ffffff;
}

/* ==========================================================================
   UNIFIED HAIRLINE-DIVIDED COMMUNITY FEED (Linear / GitHub / Peerlist Craft)
   ========================================================================== */

.hap-feed-box {
    border-radius: 10px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface);
    overflow: hidden;
    min-width: 0;
}

.hap-row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--hap-line);
    min-width: 0;
    transition: background-color 100ms cubic-bezier(0.2, 0, 0, 1);
}

.hap-row:last-child {
    border-bottom: none;
}

.hap-row:hover {
    background: var(--hap-surface-2);
}

.hap-row[hidden] {
    display: none;
}

/* Left Column of Row: Tactile Upvote Box / Stack Tile / GEO Score Tile */
.hap-vote-box {
    flex: none;
    width: 44px;
    min-height: 44px;
    padding: 4px 2px;
    border-radius: 8px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface-2);
    color: var(--hap-ink-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 14px;
    font-weight: 700;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
    transition: border-color 100ms ease, background-color 100ms ease, color 100ms ease;
}

.hap-vote-box i {
    font-size: 10.5px;
    line-height: 1;
}

.hap-vote-box:hover {
    border-color: var(--hap-accent);
    color: var(--hap-accent);
}

.hap-vote-box.is-upvoted,
.hap-vote-box[aria-pressed="true"] {
    background: #0066cc;
    border-color: #0066cc;
    color: #ffffff;
}

.hap-kind-tile {
    flex: none;
    width: 44px;
    min-height: 44px;
    border-radius: 8px;
    border: 1px solid var(--hap-line);
    background: var(--hap-accent-soft);
    color: var(--hap-accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.hap-kind-tile.is-good {
    background: var(--hap-good-bg);
    border-color: var(--hap-good-line);
    color: var(--hap-good);
}

.hap-kind-tile.is-fair {
    background: var(--hap-fair-bg);
    border-color: var(--hap-fair-line);
    color: var(--hap-fair);
}

.hap-kind-tile.is-poor {
    background: var(--hap-poor-bg);
    border-color: var(--hap-poor-line);
    color: var(--hap-poor);
}

.hap-kind-tile strong {
    font-size: 13px;
    line-height: 15px;
}

/* Middle Column of Row: Title + Tags + 1-Line Desc + Flat Micro Actions */
.hap-row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hap-row-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.hap-av {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid var(--hap-line);
    object-fit: cover;
    flex: none;
}

.hap-row-title {
    margin: 0;
    font-size: 14px;
    line-height: 19px;
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
}

.hap-row-title a {
    color: var(--hap-ink);
    text-decoration: none;
}

.hap-row-title a:hover {
    color: var(--hap-accent);
    text-decoration: underline;
}

.hap-owner {
    color: var(--hap-ink-3);
    font-weight: 500;
}

.hap-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.hap-tag.is-spot {
    background: var(--hap-fair-bg);
    border: 1px solid var(--hap-fair-line);
    color: var(--hap-fair);
}

.hap-tag.is-stack {
    background: var(--hap-accent-soft);
    border: 1px solid rgba(0, 102, 204, 0.24);
    color: var(--hap-accent);
}

.hap-tag.is-pick {
    background: var(--hap-good-bg);
    border: 1px solid var(--hap-good-line);
    color: var(--hap-good);
}

.hap-tag.is-repo {
    background: var(--hap-surface-2);
    border: 1px solid var(--hap-line);
    color: var(--hap-ink-2);
    font-weight: 500;
}

a.hap-tag:hover {
    text-decoration: underline;
}

.hap-row-desc {
    margin: 0;
    font-size: 13px;
    line-height: 18px;
    color: var(--hap-ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 639px) {
    .hap-row-desc {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}

.hap-row-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
    font-size: 12px;
    line-height: 16px;
    color: var(--hap-ink-3);
    font-variant-numeric: tabular-nums;
}

.hap-meta-sep {
    opacity: 0.45;
}

.hap-inline-act {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--hap-ink-2);
    font-family: inherit;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.hap-inline-act:hover {
    color: var(--hap-accent);
}

.hap-inline-act.is-copied,
.hap-inline-act.is-saved,
.hap-inline-act.is-cloned {
    color: var(--hap-good);
}

.hap-inline-act.is-saved i,
.hap-inline-act.is-cloned i {
    color: var(--hap-good);
}

.hap-clone-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 6px;
    border: 1px solid rgba(0, 102, 204, 0.28);
    background: var(--hap-accent-soft);
    color: var(--hap-accent);
    font-family: inherit;
    font-size: 11.5px;
    line-height: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 100ms ease, border-color 100ms ease, color 100ms ease;
}

.hap-clone-pill:hover {
    background: #0066cc;
    border-color: #0066cc;
    color: #ffffff;
}

.hap-clone-pill.is-cloned {
    background: #047857;
    border-color: #047857;
    color: #ffffff;
}

/* Compact Inline CLI Line inside Stack rows */
.hap-cli-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 16px;
    color: var(--hap-ink-2);
    min-width: 0;
}

.hap-cli-line code {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* GEO Mini Progress Bar */
.hap-geo-bar {
    width: 100%;
    max-width: 240px;
    height: 4px;
    border-radius: 999px;
    background: var(--hap-surface-3);
    overflow: hidden;
    margin-top: 3px;
}

.hap-geo-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--hap-good);
}

.hap-geo-bar.is-fair > span {
    background: var(--hap-fair);
}

.hap-geo-bar.is-poor > span {
    background: var(--hap-poor);
}

/* Right Column of Row: Crisp Stars & Gain */
.hap-row-right {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.hap-star-num {
    font-size: 13px;
    line-height: 17px;
    font-weight: 700;
    color: var(--hap-ink);
    white-space: nowrap;
}

.hap-star-num i {
    color: #d97706;
    font-size: 11px;
}

.hap-gain-num {
    font-size: 11.5px;
    line-height: 15px;
    font-weight: 600;
    color: var(--hap-good);
    white-space: nowrap;
}

.hap-row-link {
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--hap-accent);
    text-decoration: none;
    white-space: nowrap;
}

.hap-row-link:hover {
    text-decoration: underline;
}

/* Slim Stream Footer Link */
.hap-feed-more {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    background: var(--hap-surface-2);
    border-top: 1px solid var(--hap-line);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--hap-accent);
    text-decoration: none;
}

.hap-feed-more:hover {
    text-decoration: underline;
}

.hap-empty-row {
    padding: 20px 16px;
    font-size: 13.5px;
    color: var(--hap-ink-2);
    text-align: center;
}

/* Embedded 73-Tool Workbench inside the "Browser Tools" Stream Tab */
.hap-root .hap-tools-pane .tools-showcase {
    padding: 12px;
    margin: 0;
    border-radius: 10px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface);
}

.hap-root .hap-tools-pane .dch-shell {
    padding: 0;
    max-width: none;
}

.hap-root .hap-tools-pane .hub-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.hap-root .hap-tools-pane .showcase-title {
    margin: 0;
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
    color: var(--hap-ink);
}

.hap-root .hap-tools-pane .showcase-subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 16px;
    color: var(--hap-ink-3);
}

.hap-root .hap-tools-pane .view-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.hap-root .hap-tools-pane .sort-btn {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12.5px;
    gap: 6px;
    border-radius: 7px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface-2);
    color: var(--hap-ink);
}

.hap-root .hap-tools-pane .hub-inline-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: var(--hap-surface-2);
    border: 1px solid var(--hap-line-strong);
    border-radius: 7px;
    height: 32px;
    padding: 0 9px 0 28px;
    min-width: 175px;
}

.hap-root .hap-tools-pane .hub-inline-search:focus-within {
    border-color: var(--hap-accent);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.hap-root .hap-tools-pane .hub-inline-search i {
    position: absolute;
    left: 9px;
    font-size: 11.5px;
    color: var(--hap-ink-3);
    pointer-events: none;
}

.hap-root .hap-tools-pane .hub-filter-input {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    color: var(--hap-ink);
    font-family: inherit;
    font-size: 12.5px;
}

.hap-root .hap-tools-pane .hub-filter-input::placeholder {
    color: var(--hap-ink-3);
}

.hap-root .hap-tools-pane .showcase-tabs-wrapper {
    margin-bottom: 10px;
}

.hap-root .hap-tools-pane .filter-tabs {
    gap: 5px;
}

.hap-root .hap-tools-pane .filter-tabs .tab-btn {
    min-height: 28px;
    padding: 0 9px;
    font-size: 12px;
    gap: 5px;
}

.hap-root .hap-tools-pane .showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

@media (max-width: 1240px) {
    .hap-root .hap-tools-pane .showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 580px) {
    .hap-root .hap-tools-pane .showcase-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.hap-root .hap-tools-pane .showcase-grid .tool-item,
.hap-root .hap-tools-pane .showcase-grid .tool-item:last-child {
    min-height: 54px;
    padding: 8px 30px 8px 10px;
    gap: 8px;
    border-radius: 8px;
}

.hap-root .hap-tools-pane .showcase-grid .tool-item:hover,
.hap-root .hap-tools-pane .showcase-grid .tool-item:last-child:hover {
    padding-left: 10px;
}

.hap-root .hap-tools-pane .showcase-grid .tool-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 12px;
}

.hap-root .hap-tools-pane .showcase-grid .tool-body {
    gap: 2px;
}

.hap-root .hap-tools-pane .showcase-grid .tool-title {
    font-size: 12.5px;
    line-height: 16px;
}

.hap-root .hap-tools-pane .showcase-grid .tool-meta {
    gap: 4px;
}

.hap-root .hap-tools-pane .showcase-grid .tool-badge {
    font-size: 9.5px;
    line-height: 13px;
    padding: 1px 5px;
}

.hap-root .hap-tools-pane .showcase-grid .tool-cat-label {
    font-size: 10.5px;
}

.hap-root .hap-tools-pane .showcase-grid .tool-desc {
    font-size: 11px;
    line-height: 14px;
    -webkit-line-clamp: 1;
}

.hap-root .hap-tools-pane .favorite-toggle {
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    font-size: 11.5px;
}

.hap-root .hap-tools-pane .hub-expand-wrap {
    margin-top: 10px;
}

.hap-root .hap-tools-pane .hub-expand-btn {
    min-height: 34px;
    padding: 0 14px;
    font-size: 12.5px;
}

/* ==========================================================================
   COLUMN 3: RIGHT STICKY LIVE PULSE RAIL (Ultra-Compact & Uncluttered)
   ========================================================================== */

.hap-right {
    position: sticky;
    top: 72px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.hap-widget {
    border-radius: 10px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface);
    overflow: hidden;
    min-width: 0;
}

.hap-w-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
}

.hap-w-title {
    margin: 0;
    font-size: 12.5px;
    line-height: 16px;
    font-weight: 600;
    color: var(--hap-ink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hap-w-title i {
    color: var(--hap-accent);
    font-size: 12px;
}

.hap-w-more {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--hap-accent);
    text-decoration: none;
    white-space: nowrap;
}

.hap-w-more:hover {
    text-decoration: underline;
}

.hap-w-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 11px;
    border-bottom: 1px solid var(--hap-line);
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: background-color 100ms ease;
}

.hap-w-row:last-child {
    border-bottom: none;
}

a.hap-w-row:hover {
    background: var(--hap-surface-2);
}

.hap-w-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.hap-w-rank {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: var(--hap-surface-3);
    color: var(--hap-ink-2);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-variant-numeric: tabular-nums;
}

.hap-w-rank.is-1 {
    background: var(--hap-fair-bg);
    color: var(--hap-fair);
    border: 1px solid var(--hap-fair-line);
}

.hap-w-rank.is-2 {
    background: rgba(71, 85, 105, 0.11);
    color: #334155;
    border: 1px solid rgba(71, 85, 105, 0.28);
}

[data-theme="dark"] .hap-w-rank.is-2 {
    background: rgba(203, 213, 225, 0.14);
    color: #cbd5e1;
    border-color: rgba(203, 213, 225, 0.30);
}

.hap-w-rank.is-3 {
    background: rgba(154, 52, 18, 0.10);
    color: #9a3412;
    border: 1px solid rgba(154, 52, 18, 0.28);
}

[data-theme="dark"] .hap-w-rank.is-3 {
    background: rgba(251, 146, 60, 0.14);
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.30);
}

.hap-w-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.hap-w-name {
    font-size: 12.5px;
    line-height: 16px;
    font-weight: 600;
    color: var(--hap-ink);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.hap-w-name:hover {
    color: var(--hap-accent);
    text-decoration: underline;
}

.hap-w-sub {
    font-size: 11px;
    line-height: 14px;
    color: var(--hap-ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.hap-spot-vote {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 48px;
    min-height: 28px;
    padding: 0 7px;
    border-radius: 7px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface-2);
    color: var(--hap-ink);
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
    transition: background-color 100ms ease, border-color 100ms ease, color 100ms ease;
}

.hap-spot-vote:hover {
    border-color: var(--hap-accent);
    color: var(--hap-accent);
}

.hap-spot-vote.is-voted,
.hap-spot-vote[aria-pressed="true"] {
    background: #047857;
    border-color: #047857;
    color: #ffffff;
}

.hap-score-pill {
    flex: none;
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: var(--hap-surface-3);
    color: var(--hap-ink);
}

.hap-score-pill.is-good {
    background: var(--hap-good-bg);
    border: 1px solid var(--hap-good-line);
    color: var(--hap-good);
}

.hap-score-pill.is-fair {
    background: var(--hap-fair-bg);
    border: 1px solid var(--hap-fair-line);
    color: var(--hap-fair);
}

.hap-score-pill.is-poor {
    background: var(--hap-poor-bg);
    border: 1px solid var(--hap-poor-line);
    color: var(--hap-poor);
}

.hap-w-form {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
}

.hap-w-input {
    flex: 1;
    min-width: 0;
    height: 32px;
    padding: 0 9px;
    border-radius: 7px;
    border: 1px solid var(--hap-line-strong);
    background: var(--hap-surface);
    color: var(--hap-ink);
    font-family: inherit;
    font-size: 12.5px;
}

.hap-w-btn {
    flex: none;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface);
    color: var(--hap-ink);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.hap-w-btn:hover {
    border-color: var(--hap-accent);
    color: var(--hap-accent);
}

.hap-w-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 12px;
    border-top: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    font-size: 11.5px;
    color: var(--hap-ink-3);
}

.hap-w-foot a {
    color: var(--hap-accent);
    font-weight: 600;
    text-decoration: none;
}

.hap-w-foot a:hover {
    text-decoration: underline;
}

.hap-ext-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 12px;
    border-top: 1px solid var(--hap-line);
    font-size: 12px;
    line-height: 16px;
    color: var(--hap-ink-2);
    text-decoration: none;
}

.hap-ext-row:first-of-type {
    border-top: none;
}

.hap-ext-row:hover {
    background: var(--hap-surface-2);
    color: var(--hap-accent);
}

/* ==========================================================================
   SHARED COMMUNITY SUB-PAGE PRIMITIVES (/best-skills, /spotlight, /stacks, /geo)
   ========================================================================== */

.hap-section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
}

.hap-section-title {
    margin: 0;
    font-size: 12.5px;
    line-height: 16px;
    font-weight: 600;
    color: var(--hap-ink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hap-section-title i {
    color: var(--hap-accent);
    font-size: 12px;
}

.hap-section-sub {
    font-size: 11.5px;
    color: var(--hap-ink-3);
    font-variant-numeric: tabular-nums;
}

/* Reusable slim search box for Stacks & GEO Leaderboard */
.hap-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 36px;
    padding: 0 10px 0 32px;
    border-radius: 8px;
    border: 1px solid var(--hap-line-strong);
    background: var(--hap-surface-2);
}

.hap-search-bar:focus-within {
    border-color: var(--hap-accent);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.hap-search-bar i {
    position: absolute;
    left: 11px;
    font-size: 12.5px;
    color: var(--hap-ink-3);
    pointer-events: none;
}

.hap-search-bar input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--hap-ink);
    font-family: inherit;
    font-size: 13.5px;
}

.hap-search-bar input::placeholder {
    color: var(--hap-ink-3);
}

/* Compact 3-column Top 3 Podium Strip (GEO Leaderboard) */
.hap-podium-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 680px) {
    .hap-podium-3 {
        grid-template-columns: minmax(0, 1fr);
    }
}

.hap-podium-tile {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface);
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: border-color 100ms ease;
}

.hap-podium-tile:hover {
    border-color: var(--hap-accent);
}

.hap-podium-tile.is-1 {
    border-color: var(--hap-fair-line);
}

.hap-podium-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.hap-podium-host {
    margin: 0;
    font-size: 13.5px;
    line-height: 18px;
    font-weight: 600;
    color: var(--hap-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hap-podium-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
    color: var(--hap-ink-3);
    font-variant-numeric: tabular-nums;
}

/* Compact Hairline Data Table (Makers & GEO Leaderboard) */
.hap-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.hap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    line-height: 17px;
    color: var(--hap-ink);
}

.hap-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hap-ink-3);
    background: var(--hap-surface-2);
    border-bottom: 1px solid var(--hap-line);
    white-space: nowrap;
}

.hap-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--hap-line);
    vertical-align: middle;
}

.hap-table tbody tr:last-child td {
    border-bottom: none;
}

.hap-table tbody tr:hover {
    background: var(--hap-surface-2);
}

.hap-table tr[hidden] {
    display: none;
}

.hap-td-rank {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--hap-ink-3);
    font-variant-numeric: tabular-nums;
    width: 42px;
}

.hap-td-host a {
    color: var(--hap-ink);
    font-weight: 600;
    text-decoration: none;
}

.hap-td-host a:hover {
    color: var(--hap-accent);
    text-decoration: underline;
}

.hap-td-fix {
    color: var(--hap-ink-2);
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hap-td-acts {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.hap-mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface-2);
    color: var(--hap-ink-2);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.hap-mini-btn:hover {
    border-color: var(--hap-accent);
    color: var(--hap-accent);
}

.hap-mini-btn.is-copied {
    background: #047857;
    border-color: #047857;
    color: #ffffff;
}

/* Right Rail Live SVG Badge & Embed Widget (Spotlight & GEO Leaderboard) */
.hap-badge-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hap-badge-preview {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: flex-start;
}

.hap-badge-preview img {
    display: block;
    max-width: 100%;
    height: auto;
}

.hap-code-box {
    border-radius: 8px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    overflow: hidden;
}

.hap-code-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 8px;
    border-bottom: 1px solid var(--hap-line);
    background: var(--hap-surface);
}

.hap-code-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
}

.hap-embed-hint {
    margin: 0;
    font-size: 11px;
    line-height: 15px;
    color: var(--hap-ink-3);
}

/* ---------- User Workspace Card (Right Sticky Rail) ---------- */
.hap-ws-id {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.hap-ws-av {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--hap-accent-soft);
    color: var(--hap-accent);
    border: 1px solid rgba(0, 102, 204, 0.24);
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.hap-ws-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--hap-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hap-ws-body {
    padding: 9px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hap-ws-prog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11.5px;
    color: var(--hap-ink-3);
    font-variant-numeric: tabular-nums;
}

.hap-ws-prog-head strong {
    color: var(--hap-ink);
    font-weight: 600;
}

.hap-ws-prog-track {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: var(--hap-surface-3);
    overflow: hidden;
}

.hap-ws-prog-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--hap-accent);
    transition: width 220ms cubic-bezier(0.2, 0, 0, 1);
}

.hap-ws-prog-fill.is-ready {
    background: var(--hap-good);
}

.hap-ws-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.hap-ws-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface-2);
    color: var(--hap-ink-2);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.hap-ws-chip:hover {
    border-color: var(--hap-accent);
    color: var(--hap-accent);
}

.hap-ws-chip.is-accent {
    background: var(--hap-accent-soft);
    border-color: rgba(0, 102, 204, 0.24);
    color: var(--hap-accent);
}

.hap-ws-perks {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    line-height: 16px;
    color: var(--hap-ink-2);
}

.hap-ws-perks li {
    display: flex;
    align-items: center;
    gap: 7px;
}

.hap-ws-perks i {
    width: 14px;
    text-align: center;
    font-size: 11px;
    color: var(--hap-accent);
    flex: none;
}

.hap-ws-perks code {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--hap-ink);
}

.hap-ws-auth-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.hap-ws-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface-2);
    color: var(--hap-ink);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 100ms ease, background-color 100ms ease, color 100ms ease;
}

.hap-ws-btn:hover {
    border-color: var(--hap-accent);
    color: var(--hap-accent);
}

.hap-ws-btn.is-solid-subtle {
    background: var(--hap-ink);
    border-color: var(--hap-ink);
    color: var(--hap-surface);
}

.hap-ws-btn.is-solid-subtle:hover {
    opacity: 0.9;
    color: var(--hap-surface);
}

/* ---------- Grade Legend Pill Strip (GEO Board Clarity) ---------- */
.hap-grade-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    font-size: 11.5px;
    color: var(--hap-ink-3);
}

.hap-grade-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hap-dot-sm {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    display: inline-block;
    flex: none;
}

.hap-dot-sm.is-good { background: var(--hap-good); }
.hap-dot-sm.is-fair { background: var(--hap-fair); }
.hap-dot-sm.is-poor { background: var(--hap-poor); }

/* ---------- One-Shot Tactile Feedback Pop + Bottom Toast ---------- */
.hap-is-pop {
    transform: scale(0.95);
    transition: transform 160ms cubic-bezier(0.2, 0, 0, 1);
}

.hap-toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%) translateY(10px);
    z-index: 95;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 28px rgba(2, 8, 20, 0.28);
    font-size: 12.5px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease-out, transform 160ms ease-out;
}

[data-theme="dark"] .hap-toast {
    background: #f1f5f9;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.14);
}

.hap-toast.is-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.hap-toast i {
    color: #34d399;
}

[data-theme="dark"] .hap-toast i {
    color: #047857;
}

.hap-code-tab {
    padding: 3px 7px;
    border-radius: 5px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--hap-ink-3);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.hap-code-tab.is-active {
    background: var(--hap-accent-soft);
    border-color: rgba(0, 102, 204, 0.24);
    color: var(--hap-accent);
}

.hap-code-pre {
    margin: 0;
    padding: 8px 9px;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 15px;
    color: var(--hap-ink-2);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 76px;
    overflow: auto;
}

/* Compact Stack Share Card Thumbnail in Right Rail */
.hap-card-thumb {
    display: block;
    width: 100%;
    border-radius: 7px;
    border: 1px solid var(--hap-line);
    overflow: hidden;
}

.hap-card-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.hap-steps-mini {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    line-height: 16px;
    color: var(--hap-ink-2);
}

.hap-steps-mini li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.hap-steps-mini b {
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--hap-accent-soft);
    color: var(--hap-accent);
    font-size: 10.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   /best-skills ULTRA-COMPACT 3-COLUMN DIRECTORY OVERRIDES (.hap-bsk)
   Preserves 100% of best-skills.js + best-skills-search.js DOM hooks
   ========================================================================== */

.hap-root.hap-bsk .bsk-search-wrap {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
}

.hap-root.hap-bsk .bsk-tile-desc {
    font-size: 12px;
    line-height: 16px;
    -webkit-line-clamp: 2;
}

.hap-mobile-only-bar {
    display: none;
}

@media (max-width: 860px) {
    .hap-mobile-only-bar {
        display: flex;
    }
}

.hap-root.hap-bsk .bsk-search {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: 38px;
    padding: 0 5px 0 11px;
    border-radius: 8px;
    border: 1px solid var(--hap-line-strong);
    background: var(--hap-surface-2);
    margin: 0;
    max-width: none;
    box-shadow: none;
}

.hap-root.hap-bsk .bsk-search:focus-within {
    border-color: var(--hap-accent);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.hap-root.hap-bsk .bsk-search > i {
    color: var(--hap-ink-3);
    font-size: 13px;
}

.hap-root.hap-bsk .bsk-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--hap-ink);
    font-size: 14px;
    font-family: inherit;
}

.hap-root.hap-bsk .bsk-search input::placeholder {
    color: var(--hap-ink-3);
}

.hap-root.hap-bsk .bsk-search-go {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: var(--hap-surface-3);
    color: var(--hap-ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hap-root.hap-bsk .bsk-search-go:hover {
    background: var(--hap-accent);
    color: #ffffff;
}

.hap-root.hap-bsk .bsk-dd {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 5px);
    z-index: 45;
    border-radius: 10px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
    max-height: 400px;
    overflow-y: auto;
}

[data-theme="dark"] .hap-root.hap-bsk .bsk-dd {
    box-shadow: 0 16px 32px rgba(2, 8, 20, 0.55);
}

.hap-root.hap-bsk .bsk-search-status {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--hap-ink-3);
}

/* Segmented Type toggle inside Left Rail */
.hap-seg-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
    border-radius: 8px;
    background: var(--hap-surface-2);
    border: 1px solid var(--hap-line);
    margin: 2px 4px 4px;
}

.hap-seg-3 .bsk-seg-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 3px 2px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--hap-ink-2);
    font-family: inherit;
    font-size: 11px;
    line-height: 14px;
    font-weight: 600;
    cursor: pointer;
}

.hap-seg-3 .bsk-seg-btn[aria-pressed="true"] {
    background: var(--hap-surface);
    color: var(--hap-accent);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.hap-seg-3 .bsk-seg-count {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--hap-ink-3);
    font-variant-numeric: tabular-nums;
}

/* Compact Agent Pills on /best-skills topbar */
.hap-root.hap-bsk .bsk-agent-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

@media (max-width: 639px) {
    .hap-root.hap-bsk .bsk-agent-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .hap-root.hap-bsk .bsk-agent-pills::-webkit-scrollbar {
        display: none;
    }
}

.hap-root.hap-bsk .bsk-agent-pills .bsk-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    color: var(--hap-ink-2);
    font-family: inherit;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    cursor: pointer;
    flex: none;
    white-space: nowrap;
    width: auto;
}

.hap-root.hap-bsk .bsk-agent-pills .bsk-filter svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.hap-root.hap-bsk .bsk-agent-pills .bsk-filter:hover {
    border-color: var(--hap-line-strong);
    color: var(--hap-ink);
}

.hap-root.hap-bsk .bsk-agent-pills .bsk-filter[aria-pressed="true"] {
    background: var(--hap-ink);
    border-color: var(--hap-ink);
    color: var(--hap-surface);
    font-weight: 600;
}

.hap-root.hap-bsk .bsk-agent-pills .bsk-agent-count {
    font-family: var(--font-mono);
    font-size: 10.5px;
    opacity: 0.72;
    font-variant-numeric: tabular-nums;
}

/* Slim Ecosystem Ribbon inside /best-skills */
.hap-eco-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 7px 11px;
    border-radius: 10px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface);
}

.hap-eco-strip::-webkit-scrollbar {
    display: none;
}

/* Compact Editor's Picks Strip on /best-skills (~115px total height) */
.hap-root.hap-bsk .bsk-shelf {
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface);
}

.hap-root.hap-bsk .bsk-shelf-head {
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hap-root.hap-bsk .bsk-shelf-title {
    margin: 0;
    font-size: 11px;
    line-height: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hap-ink-3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hap-root.hap-bsk .bsk-shelf-title i {
    color: var(--hap-fair);
}

.hap-root.hap-bsk .bsk-shelf-sub {
    display: none;
}

.hap-root.hap-bsk .bsk-shelf-nav {
    display: inline-flex;
    gap: 4px;
}

.hap-root.hap-bsk .bsk-shelf-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 10.5px;
}

.hap-root.hap-bsk .bsk-shelf-track {
    display: flex;
    gap: 7px;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.hap-root.hap-bsk .bsk-shelf-track::-webkit-scrollbar {
    display: none;
}

.hap-root.hap-bsk .bsk-tile {
    flex: 0 0 246px;
    min-width: 246px;
    max-width: 246px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    box-shadow: none;
    transition: border-color 100ms ease, background-color 100ms ease;
}

.hap-root.hap-bsk .bsk-tile:hover {
    border-color: var(--hap-line-2);
    background: var(--hap-surface);
    transform: none;
}

.hap-root.hap-bsk .bsk-tile-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    min-width: 0;
}

.hap-root.hap-bsk .bsk-tile .bsk-avatar {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    flex: none;
}

.hap-root.hap-bsk .bsk-tile .bsk-name {
    margin: 0;
    font-size: 12.5px;
    line-height: 16px;
    font-weight: 600;
    min-width: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hap-root.hap-bsk .bsk-tile .bsk-name-link {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hap-root.hap-bsk .bsk-tile .bsk-desc {
    margin: 0;
    font-size: 11.5px;
    line-height: 15px;
    color: var(--hap-ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    -webkit-line-clamp: unset;
}

.hap-root.hap-bsk .bsk-tile-foot {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 2px 0 0;
    padding: 0;
    font-size: 11px;
    line-height: 15px;
}

.hap-root.hap-bsk .bsk-tile-stars {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--hap-ink);
    font-variant-numeric: tabular-nums;
}

.hap-root.hap-bsk .bsk-tile-stars i {
    color: #d97706;
    font-size: 10px;
}

.hap-root.hap-bsk .bsk-tile-label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--hap-fair);
    background: var(--hap-fair-bg);
    border: 1px solid var(--hap-fair-line);
    padding: 1px 6px;
    border-radius: 999px;
}

.hap-root.hap-bsk .bsk-tile-up {
    position: relative;
    z-index: 3;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    padding: 0 7px;
    border-radius: 6px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface);
    color: var(--hap-ink-2);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
    transition: border-color 100ms ease, background-color 100ms ease, color 100ms ease;
}

.hap-root.hap-bsk .bsk-tile-up:hover {
    border-color: var(--hap-accent);
    color: var(--hap-accent);
}

.hap-root.hap-bsk .bsk-tile-up.is-upvoted,
.hap-root.hap-bsk .bsk-tile-up[aria-pressed="true"] {
    background: #0066cc;
    border-color: #0066cc;
    color: #ffffff;
}

/* Unified Hairline-Divided Ultra-Compact Skill Directory (#bsk-grid) */
.hap-root.hap-bsk .bsk-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.hap-root.hap-bsk .bsk-panel-head-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
}

.hap-root.hap-bsk .bsk-panel-title {
    margin: 0;
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
    color: var(--hap-ink);
}

.hap-root.hap-bsk .bsk-context {
    margin: 0;
    font-size: 11.5px;
    line-height: 16px;
    color: var(--hap-ink-3);
    text-align: right;
}

@media (max-width: 720px) {
    .hap-root.hap-bsk .bsk-panel-head-inline {
        flex-direction: column;
        align-items: flex-start;
    }
    .hap-root.hap-bsk .bsk-context {
        text-align: left;
    }
}

.hap-root.hap-bsk #bsk-grid.bsk-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Rebuilt 5-Column High-Density Skill Row with Live Upvote + Aligned Actions */
.hap-root.hap-bsk #bsk-grid .bsk-card {
    display: grid;
    grid-template-columns: 24px 40px 26px minmax(0, 1fr) 202px;
    gap: 0 10px;
    align-items: center;
    margin: 0;
    border: none;
    border-bottom: 1px solid var(--hap-line);
    border-radius: 0;
    background: transparent;
    padding: 9px 12px;
    box-shadow: none;
    min-width: 0;
    transition: background-color 100ms cubic-bezier(0.2, 0, 0, 1);
}

.hap-root.hap-bsk #bsk-grid .bsk-card:last-child {
    border-bottom: none;
}

.hap-root.hap-bsk #bsk-grid .bsk-card:hover {
    background: var(--hap-surface-2);
    border-color: var(--hap-line);
    transform: none;
}

/* Col 1: Gold / Silver / Bronze Rank Medal */
.hap-root.hap-bsk #bsk-grid .bsk-rank {
    width: 24px;
    height: 24px;
    min-width: 24px;
    padding: 0;
    margin: 0;
    align-self: center;
    border-radius: 6px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-3);
    color: var(--hap-ink-3);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.hap-root.hap-bsk #bsk-grid .bsk-rank.is-1 {
    background: var(--hap-fair-bg);
    color: var(--hap-fair);
    border-color: var(--hap-fair-line);
}

.hap-root.hap-bsk #bsk-grid .bsk-rank.is-2 {
    background: rgba(71, 85, 105, 0.11);
    color: #334155;
    border-color: rgba(71, 85, 105, 0.28);
}

[data-theme="dark"] .hap-root.hap-bsk #bsk-grid .bsk-rank.is-2 {
    background: rgba(203, 213, 225, 0.14);
    color: #cbd5e1;
    border-color: rgba(203, 213, 225, 0.30);
}

.hap-root.hap-bsk #bsk-grid .bsk-rank.is-3 {
    background: rgba(154, 52, 18, 0.10);
    color: #9a3412;
    border-color: rgba(154, 52, 18, 0.28);
}

[data-theme="dark"] .hap-root.hap-bsk #bsk-grid .bsk-rank.is-3 {
    background: rgba(251, 146, 60, 0.14);
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.30);
}

/* Col 2: Tactile Live Upvote Box */
.hap-root.hap-bsk #bsk-grid .bsk-card-up {
    position: relative;
    z-index: 3;
    align-self: center;
    width: 40px;
    min-height: 40px;
    padding: 3px 2px;
    border-radius: 7px;
    font-size: 11.5px;
}

/* Col 3: Compact 26px Avatar */
.hap-root.hap-bsk #bsk-grid .bsk-avatar {
    align-self: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--hap-line);
    object-fit: cover;
    margin: 0;
}

/* Col 4: Dense 3-Line Body */
.hap-root.hap-bsk #bsk-grid .bsk-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
}

.hap-root.hap-bsk #bsk-grid .bsk-head-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

.hap-root.hap-bsk #bsk-grid .bsk-name {
    margin: 0;
    font-size: 13.5px;
    line-height: 18px;
    font-weight: 600;
    min-width: 0;
}

.hap-root.hap-bsk #bsk-grid .bsk-name-link {
    color: var(--hap-ink);
    text-decoration: none;
}

.hap-root.hap-bsk #bsk-grid .bsk-name-link:hover {
    color: var(--hap-accent);
    text-decoration: underline;
}

.hap-root.hap-bsk #bsk-grid .bsk-owner {
    color: var(--hap-ink-3);
    font-weight: 500;
}

.hap-root.hap-bsk #bsk-grid .bsk-eco-tag {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10.5px;
    line-height: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.hap-root.hap-bsk #bsk-grid .bsk-eco-tag.is-spot {
    background: var(--hap-fair-bg);
    border: 1px solid var(--hap-fair-line);
    color: var(--hap-fair);
}

.hap-root.hap-bsk #bsk-grid .bsk-eco-tag.is-stack {
    background: var(--hap-accent-soft);
    border: 1px solid rgba(0, 102, 204, 0.24);
    color: var(--hap-accent);
}

.hap-root.hap-bsk #bsk-grid .bsk-eco-tag.is-sig {
    background: var(--hap-good-bg);
    border: 1px solid var(--hap-good-line);
    color: var(--hap-good);
}

.hap-root.hap-bsk #bsk-grid .bsk-desc {
    margin: 0;
    font-size: 12.5px;
    line-height: 17px;
    color: var(--hap-ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    -webkit-line-clamp: unset;
}

.hap-root.hap-bsk #bsk-grid .bsk-pick {
    margin: 0;
    font-size: 11px;
    line-height: 15px;
    color: var(--hap-fair);
    font-weight: 600;
}

.hap-root.hap-bsk #bsk-grid .bsk-note {
    margin: 2px 0;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 16px;
}

.hap-root.hap-bsk #bsk-grid .bsk-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin: 2px 0 0;
}

.hap-root.hap-bsk #bsk-grid .bsk-flags,
.hap-root.hap-bsk #bsk-grid .bsk-tags {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hap-root.hap-bsk #bsk-grid .bsk-flag {
    font-size: 11px;
    line-height: 14px;
    padding: 0;
    border: none;
    background: transparent;
}

.hap-root.hap-bsk #bsk-grid .bsk-tag {
    font-size: 11px;
    line-height: 14px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--hap-ink-3);
}

.hap-root.hap-bsk #bsk-grid .bsk-tag-logo svg {
    width: 12px;
    height: 12px;
}

/* Col 5: Professionally Aligned Signal Metrics + Uniform 26px Action Row */
.hap-root.hap-bsk #bsk-grid .bsk-signal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.hap-root.hap-bsk #bsk-grid .bsk-sig-main {
    margin: 0;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    line-height: 16px;
    white-space: nowrap;
}

.hap-root.hap-bsk #bsk-grid .bsk-sig-num {
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.hap-root.hap-bsk #bsk-grid .bsk-sig-unit {
    font-size: 11px;
    color: var(--hap-ink-3);
}

.hap-root.hap-bsk #bsk-grid .bsk-bar {
    width: 100%;
    height: 3px;
    border-radius: 999px;
    margin: 0;
}

.hap-root.hap-bsk #bsk-grid .bsk-sig-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 11px;
    line-height: 14px;
    color: var(--hap-ink-3);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hap-root.hap-bsk #bsk-grid .bsk-actions {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin: 2px 0 0;
    padding: 0;
}

.hap-root.hap-bsk #bsk-grid .bsk-cli-btn,
.hap-root.hap-bsk #bsk-grid .bsk-cta,
.hap-root.hap-bsk #bsk-grid .bsk-watch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 26px;
    height: 26px;
    padding: 0 7px;
    margin: 0;
    border-radius: 6px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface-2);
    color: var(--hap-ink-2);
    font-family: inherit;
    font-size: 11px;
    line-height: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 100ms ease, background-color 100ms ease, color 100ms ease;
}

.hap-root.hap-bsk #bsk-grid .bsk-cta .bsk-ext {
    display: none;
}

.hap-root.hap-bsk #bsk-grid .bsk-watch {
    background: var(--hap-surface);
    color: var(--hap-ink);
    padding: 0 8px;
}

.hap-root.hap-bsk #bsk-grid .bsk-cli-btn:hover,
.hap-root.hap-bsk #bsk-grid .bsk-cta:hover,
.hap-root.hap-bsk #bsk-grid .bsk-watch:hover {
    border-color: var(--hap-accent);
    color: var(--hap-accent);
}

.hap-root.hap-bsk #bsk-grid .bsk-cli-btn.is-copied,
.hap-root.hap-bsk #bsk-grid .bsk-watch.is-watching,
.hap-root.hap-bsk #bsk-grid .bsk-watch[aria-pressed="true"] {
    background: #047857;
    border-color: #047857;
    color: #ffffff;
}

/* Responsive collapse for <= 760px (0px overflow) */
@media (max-width: 760px) {
    .hap-root.hap-bsk #bsk-grid .bsk-card {
        grid-template-columns: 24px 38px minmax(0, 1fr);
        gap: 6px 8px;
        align-items: start;
        padding: 10px;
    }
    .hap-root.hap-bsk #bsk-grid .bsk-avatar {
        display: none;
    }
    .hap-root.hap-bsk #bsk-grid .bsk-desc {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .hap-root.hap-bsk #bsk-grid .bsk-signal {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px 10px;
        padding-top: 6px;
        border-top: 1px solid var(--hap-line);
    }
    .hap-root.hap-bsk #bsk-grid .bsk-bar {
        display: none;
    }
    .hap-root.hap-bsk #bsk-grid .bsk-sig-meta {
        justify-content: flex-start;
    }
}

.hap-root.hap-bsk .bsk-view {
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface);
}

.hap-root.hap-bsk .bsk-more {
    margin: 0;
    padding: 9px 14px;
    border-top: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    text-align: center;
}

.hap-root.hap-bsk .bsk-more-btn {
    min-height: 32px;
    padding: 0 14px;
    border-radius: 7px;
    font-size: 12.5px;
}

/* ==========================================================================
   /git/{owner}/{repo} — ULTRA-CLEAN ALIGNED 3-COLUMN SKILL DETAIL (.hap-detail)
   ========================================================================== */

.hap-det-crumb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: var(--hap-ink-3);
}

.hap-det-crumb {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hap-det-crumb a {
    color: var(--hap-ink-3);
    text-decoration: none;
}

.hap-det-crumb a:hover {
    color: var(--hap-accent);
    text-decoration: underline;
}

.hap-det-fresh {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--hap-surface-2);
    border: 1px solid var(--hap-line);
    font-size: 11px;
    font-weight: 600;
    color: var(--hap-ink-2);
}

.hap-det-fresh.is-fresh {
    background: var(--hap-good-bg);
    border-color: var(--hap-good-line);
    color: var(--hap-good);
}

.hap-det-id {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.hap-det-id img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--hap-line);
    flex: none;
    object-fit: cover;
}

.hap-det-id-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hap-det-h1 {
    margin: 0;
    font-size: 20px;
    line-height: 25px;
    letter-spacing: -0.015em;
    font-weight: 700;
    color: var(--hap-ink);
    overflow-wrap: anywhere;
}

.hap-det-h1 span {
    color: var(--hap-ink-3);
    font-weight: 500;
}

.hap-det-lead {
    margin: 0;
    font-size: 13.5px;
    line-height: 20px;
    color: var(--hap-ink-2);
}

.hap-det-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.hap-det-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    height: 34px;
    padding: 0 11px;
    border-radius: 7px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface-2);
    color: var(--hap-ink);
    font-family: inherit;
    font-size: 12.5px;
    line-height: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    transition: border-color 100ms ease, background-color 100ms ease, color 100ms ease;
}

.hap-det-btn:hover {
    border-color: var(--hap-accent);
    color: var(--hap-accent);
}

.hap-det-btn.is-dark {
    background: var(--hap-ink);
    border-color: var(--hap-ink);
    color: var(--hap-surface);
}

.hap-det-btn.is-dark:hover {
    opacity: 0.9;
    color: var(--hap-surface);
}

.hap-det-btn.is-stack-add {
    background: var(--hap-accent-soft);
    border-color: rgba(0, 102, 204, 0.28);
    color: var(--hap-accent);
}

.hap-det-btn.is-stack-add:hover {
    background: #0066cc;
    border-color: #0066cc;
    color: #ffffff;
}

.hap-det-btn.is-active,
.hap-det-btn.is-watching,
.hap-det-btn.is-done {
    background: #047857;
    border-color: #047857;
    color: #ffffff;
}

.hap-det-btn.is-up-btn.is-active {
    background: #0066cc;
    border-color: #0066cc;
    color: #ffffff;
}

.hap-det-btn .hap-cnt-pill {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .hap-det-btn .hap-cnt-pill {
    background: rgba(255, 255, 255, 0.12);
}

.hap-det-btn.is-active .hap-cnt-pill {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.hap-det-meta-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--hap-line);
}

.hap-det-medal {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    font-size: 11.5px;
    line-height: 16px;
    color: var(--hap-ink-2);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.hap-det-medal b {
    font-family: var(--font-mono);
    color: var(--hap-ink);
}

.hap-det-medal.is-top {
    background: var(--hap-fair-bg);
    border-color: var(--hap-fair-line);
    color: var(--hap-fair);
}

.hap-det-medal.is-top b {
    color: var(--hap-fair);
}

.hap-det-medal:hover {
    border-color: var(--hap-accent);
    color: var(--hap-accent);
}

.hap-det-agent-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    font-size: 11.5px;
    color: var(--hap-ink-2);
}

.hap-det-agent-tag svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* Star Momentum Chart Card */
.hap-det-chart-body {
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hap-det-mini-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 8px 14px;
    border-top: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    margin: 0;
    list-style: none;
    font-size: 12px;
    color: var(--hap-ink-2);
    font-variant-numeric: tabular-nums;
}

.hap-det-mini-stats li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hap-det-mini-stats i {
    color: var(--hap-ink-3);
    font-size: 11.5px;
}

.hap-det-mini-stats strong {
    color: var(--hap-ink);
}

/* Community Verification Grid: Symmetric 3x2 (zero 5+1 orphan!) */
.hap-det-comm-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hap-det-agents-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

@media (max-width: 640px) {
    .hap-det-agents-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hap-det-agents-grid .sks-agent-btn {
    width: 100%;
    justify-content: flex-start;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 12.5px;
}

.hap-root .bsk-logo {
    fill: currentColor;
}

.hap-det-agents-grid .sks-agent-btn .bsk-logo {
    width: 15px;
    height: 15px;
    fill: currentColor;
    flex: none;
}

.hap-det-agents-grid .sks-agent-cnt {
    margin-left: auto;
}

.hap-det-comm-body .sks-tip-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px auto;
    gap: 6px;
}

@media (max-width: 640px) {
    .hap-det-comm-body .sks-tip-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.hap-det-comm-body .sks-input,
.hap-det-comm-body .sks-select {
    height: 34px;
    font-size: 12.5px;
    border-radius: 7px;
}

.hap-det-comm-body .sks-submit {
    min-height: 34px;
    height: 34px;
    padding: 0 12px;
    border-radius: 7px;
    background: var(--hap-ink);
    border: 1px solid var(--hap-ink);
    color: var(--hap-surface);
    font-size: 12.5px;
}

.hap-det-comm-body .sks-submit:hover {
    opacity: 0.9;
}

/* What It Does Skills Grid (1-col when 1 skill, symmetric 2-col when >=2) */
.hap-det-skills-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 14px;
    margin: 0;
    list-style: none;
}

.hap-det-skills-list.is-single {
    grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 640px) {
    .hap-det-skills-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

.hap-det-skills-list .bskd-skill {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hap-det-skills-list .bskd-skill-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}

.hap-det-skills-list .bskd-skill-head h3 {
    margin: 0;
    font-size: 13.5px;
    line-height: 18px;
    font-weight: 600;
    color: var(--hap-ink);
}

.hap-det-skills-list .bskd-skill-desc {
    margin: 0;
    font-size: 12.5px;
    line-height: 18px;
    color: var(--hap-ink-2);
}

.hap-det-skills-list .bskd-skill-src {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--hap-accent);
    text-decoration: none;
}

.hap-det-skills-list .bskd-skill-src:hover {
    text-decoration: underline;
}

.hap-det-sec-note {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-top: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    font-size: 11.5px;
    color: var(--hap-ink-3);
}

.hap-det-sec-note i {
    color: var(--hap-fair);
}

/* Similar Skills Clean 3-Col Grid */
.hap-det-similar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 14px;
    margin: 0;
    list-style: none;
}

@media (max-width: 900px) {
    .hap-det-similar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .hap-det-similar {
        grid-template-columns: minmax(0, 1fr);
    }
}

.hap-det-sim-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: border-color 100ms ease, background-color 100ms ease;
}

.hap-det-sim-card:hover {
    border-color: var(--hap-accent);
    background: var(--hap-surface);
}

.hap-det-sim-top {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.hap-det-sim-top img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--hap-line);
    flex: none;
}

.hap-det-sim-name {
    font-size: 12.5px;
    line-height: 16px;
    font-weight: 600;
    color: var(--hap-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hap-det-sim-owner {
    font-size: 11px;
    line-height: 14px;
    color: var(--hap-ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hap-det-sim-desc {
    font-size: 11.5px;
    line-height: 15px;
    color: var(--hap-ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hap-det-sim-meta {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--hap-ink-3);
    font-variant-numeric: tabular-nums;
}

.hap-det-sim-meta i.fa-star {
    color: #d97706;
}

/* Right Rail Install Card */
.hap-det-install-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hap-det-install-body .bskd-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
    margin: 0;
    border-radius: 7px;
    background: var(--hap-surface-2);
    border: 1px solid var(--hap-line);
}

.hap-det-install-body .bskd-tabs button {
    min-height: 26px;
    padding: 0 6px;
    border-radius: 5px;
    border: none;
    background: transparent;
    color: var(--hap-ink-2);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
}

.hap-det-install-body .bskd-tabs button[aria-selected="true"] {
    background: var(--hap-surface);
    color: var(--hap-accent);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.hap-det-install-body .bskd-cmd {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #24324a;
    background: #0f172a;
}

.hap-det-install-body .bskd-term-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
}

.hap-det-install-body .bskd-term-body code {
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 17px;
    color: #e2e8f0;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: pre-wrap;
    flex: 1;
    min-width: 0;
}

.hap-det-install-body .bskd-copy {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.hap-det-install-body .bskd-copy.is-done {
    background: #047857;
    border-color: #047857;
}

.hap-det-install-body .bskd-panel-help {
    margin: 6px 0 0;
    font-size: 11.5px;
    line-height: 16px;
    color: var(--hap-ink-3);
}

/* Right Rail Facts Table */
.hap-det-facts {
    margin: 0;
    padding: 0;
}

.hap-det-facts > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--hap-line);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.hap-det-facts > div:last-child {
    border-bottom: none;
}

.hap-det-facts dt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hap-ink-3);
    margin: 0;
}

.hap-det-facts dd {
    margin: 0;
    font-weight: 600;
    color: var(--hap-ink);
    text-align: right;
}

/* =====================================================================
 * Local Center Topbar Sub-Tabs & Filters (keeps global left rail locked)
 * ===================================================================== */

.hap-subtabs,
.hap-root.hap-bsk #bsk-rank-tabs.bsk-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.hap-subtab,
.hap-root.hap-bsk #bsk-rank-tabs .bsk-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 27px;
    padding: 0 9px;
    margin: 0;
    border-radius: 6px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    color: var(--hap-ink-2);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.hap-subtab i,
.hap-root.hap-bsk #bsk-rank-tabs .bsk-tab i {
    font-size: 11px;
    opacity: 0.78;
}

.hap-subtab:hover,
.hap-root.hap-bsk #bsk-rank-tabs .bsk-tab:hover {
    border-color: var(--hap-line-strong);
    color: var(--hap-ink);
    background: var(--hap-surface);
}

.hap-subtab.is-active,
.hap-subtab[aria-selected="true"],
.hap-root.hap-bsk #bsk-rank-tabs .bsk-tab.is-active,
.hap-root.hap-bsk #bsk-rank-tabs .bsk-tab[aria-selected="true"] {
    background: var(--hap-accent-soft);
    border-color: rgba(0, 102, 204, 0.34);
    color: var(--hap-accent);
}

.hap-subtab.is-active i,
.hap-subtab[aria-selected="true"] i,
.hap-root.hap-bsk #bsk-rank-tabs .bsk-tab.is-active i,
.hap-root.hap-bsk #bsk-rank-tabs .bsk-tab[aria-selected="true"] i {
    opacity: 1;
}

.hap-chip-cnt {
    font-size: 10.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    opacity: 0.72;
}

.hap-pill-sep {
    display: inline-block;
    width: 1px;
    height: 16px;
    margin: 0 2px;
    background: var(--hap-line-strong);
    flex: none;
}

.hap-bsk-controls {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--hap-line);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.hap-root.hap-bsk .hap-bsk-controls #bsk-rank-tabs.bsk-tabs {
    margin-top: 0;
}

.hap-bsk-subrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.hap-bsk-kind {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px;
    border-radius: 7px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
}

.hap-root.hap-bsk .hap-kind-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 23px;
    padding: 0 8px;
    border-radius: 5px;
    border: 0;
    background: transparent;
    color: var(--hap-ink-2);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}

.hap-root.hap-bsk .hap-kind-btn:hover {
    color: var(--hap-ink);
}

.hap-root.hap-bsk .hap-kind-btn[aria-pressed="true"] {
    background: var(--hap-surface);
    color: var(--hap-ink);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.hap-bsk-guides {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hap-root.hap-bsk .hap-guide-link {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--hap-ink-3);
    text-decoration: none;
    padding: 2px 0;
    border-bottom: 1.5px solid transparent;
    transition: color 120ms ease, border-color 120ms ease;
}

.hap-root.hap-bsk .hap-guide-link:hover,
.hap-root.hap-bsk .hap-guide-link.is-active,
.hap-root.hap-bsk .hap-guide-link[aria-selected="true"] {
    color: var(--hap-accent);
    border-bottom-color: var(--hap-accent);
}

@media (max-width: 640px) {
    .hap-subtabs,
    .hap-root.hap-bsk #bsk-rank-tabs.bsk-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .hap-subtabs::-webkit-scrollbar,
    .hap-root.hap-bsk #bsk-rank-tabs.bsk-tabs::-webkit-scrollbar {
        display: none;
    }
}

/* ==========================================================================
   LIVE TOOL ACTIVITY, QUICK DOCK MODES, MY COLLECTION STUDIO & GEO INLINE
   ========================================================================== */

.hap-dock-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    min-width: 0;
}

@media (max-width: 560px) {
    .hap-dock-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        flex: 1;
    }
    .hap-dock-tabs::-webkit-scrollbar {
        display: none;
    }
    .hap-dock-tab {
        flex: none;
        white-space: nowrap;
        padding: 0 7px;
    }
}

.hap-dock-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--hap-ink-3);
    font-family: inherit;
    font-size: 11px;
    line-height: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 100ms ease, color 100ms ease, border-color 100ms ease;
}

.hap-dock-tab:hover {
    color: var(--hap-ink);
    background: var(--hap-surface-2);
}

.hap-dock-tab.is-active {
    background: var(--hap-surface-3);
    border-color: var(--hap-line-2);
    color: var(--hap-ink);
}

.hap-dock-tab i {
    font-size: 10px;
}

.hap-dock-grid[hidden] {
    display: none;
}

.hap-dock-time {
    flex: none;
    font-family: var(--font-mono);
    font-size: 10.5px;
    line-height: 14px;
    color: var(--hap-ink-3);
    font-variant-numeric: tabular-nums;
}

.hap-dock-empty {
    grid-column: 1 / -1;
    padding: 9px 10px;
    border-radius: 7px;
    border: 1px dashed var(--hap-line-2);
    background: var(--hap-surface-2);
    font-size: 12px;
    line-height: 16px;
    color: var(--hap-ink-2);
    text-align: center;
}

.hap-cc-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    height: 15px;
    border-radius: 4px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface-3);
    color: var(--hap-ink-2);
    font-family: var(--font-mono);
    font-size: 9.5px;
    line-height: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex: none;
}

.hap-w-head-right {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
}

.hap-icon-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface);
    color: var(--hap-ink-3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: border-color 100ms ease, color 100ms ease;
}

.hap-icon-btn:hover {
    border-color: var(--hap-accent);
    color: var(--hap-accent);
}

.hap-icon-btn.is-spinning i {
    transform: rotate(180deg);
    transition: transform 240ms ease-out;
}

.hap-act-ic {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
    color: var(--hap-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex: none;
}

.hap-act-row .hap-w-sub {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hap-mem-dot {
    color: var(--hap-good);
    font-weight: 600;
}

.hap-act-time {
    flex: none;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 14px;
    font-weight: 600;
    color: var(--hap-ink-3);
    font-variant-numeric: tabular-nums;
}

.hap-foot-btn {
    border: none;
    background: transparent;
    padding: 0;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--hap-accent);
    cursor: pointer;
}

.hap-foot-btn:hover {
    text-decoration: underline;
}

/* Interactive My Collection Studio (Bulk CLI + Inline /u/ Publish + Live SVG Badge) */
.hap-mystack-studio {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--hap-line);
    background: var(--hap-surface-2);
}

.hap-mystack-cli {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hap-mystack-cli[hidden],
.hap-mystack-badge[hidden] {
    display: none;
}

.hap-mystack-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hap-mystack-lbl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    line-height: 16px;
    font-weight: 600;
    color: var(--hap-ink-2);
}

.hap-mystack-lbl i {
    color: var(--hap-accent);
    font-size: 11.5px;
}

.hap-mystack-code {
    display: block;
    padding: 8px 10px;
    border-radius: 7px;
    border: 1px solid var(--hap-line-2);
    background: var(--hap-surface);
    color: var(--hap-ink);
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 17px;
    overflow-x: auto;
    white-space: nowrap;
}

.hap-slug-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hap-slug-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.hap-slug-field {
    flex: 1 1 200px;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 32px;
    border-radius: 7px;
    border: 1px solid var(--hap-line-strong);
    background: var(--hap-surface);
    overflow: hidden;
}

.hap-slug-field:focus-within {
    border-color: var(--hap-accent);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.14);
}

.hap-slug-prefix {
    padding: 0 6px 0 9px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--hap-ink-3);
    background: var(--hap-surface-2);
    height: 100%;
    display: inline-flex;
    align-items: center;
    border-right: 1px solid var(--hap-line);
    flex: none;
}

.hap-slug-field input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 8px;
    color: var(--hap-ink);
    font-family: var(--font-mono);
    font-size: 12px;
}

.hap-slug-field input:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: -2px;
}

.hap-w-btn.is-accent-btn {
    background: var(--hap-accent-soft);
    border-color: rgba(0, 102, 204, 0.34);
    color: var(--hap-accent);
}

.hap-w-btn.is-accent-btn:hover {
    background: #0066cc;
    border-color: #0066cc;
    color: #ffffff;
}

.hap-w-btn[hidden] {
    display: none;
}

.hap-slug-status {
    margin: 0;
    font-size: 12px;
    line-height: 16px;
    color: var(--hap-ink-2);
    min-height: 0;
}

.hap-slug-status.is-ok {
    color: var(--hap-good);
    font-weight: 600;
}

.hap-slug-status.is-error {
    color: var(--hap-poor);
    font-weight: 600;
}

.hap-mystack-hint {
    margin: 0;
    padding: 8px 10px;
    border-radius: 7px;
    border: 1px dashed var(--hap-line-2);
    background: var(--hap-surface);
    font-size: 12px;
    line-height: 17px;
    color: var(--hap-ink-2);
}

.hap-mystack-hint[hidden] {
    display: none;
}

.hap-mystack-hint code {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--hap-accent);
}

.hap-mystack-badge {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--hap-line);
}

/* Inline AJAX GEO Quick-Check Card inside Right Rail */
.hap-geo-inline {
    padding: 9px 11px;
    border-top: 1px solid var(--hap-line);
    background: var(--hap-surface);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.hap-geo-inline[hidden] {
    display: none;
}

.hap-geo-inline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}

.hap-geo-inline-host {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--hap-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hap-geo-inline-badge {
    max-width: 100%;
    height: auto;
    display: block;
}

.hap-geo-inline-acts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* Shareable 1200x630 PNG Card & Certificate Preview */
.hap-png-preview {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--hap-line-2);
    background: #0b1220;
    text-decoration: none;
}

.hap-png-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.hap-badge-gallery {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.hap-badge-gallery img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Focus rings */
.hap-nav-btn:focus-visible,
.hap-subtab:focus-visible,
.hap-kind-btn:focus-visible,
.hap-guide-link:focus-visible,
.hap-primary-cta:focus-visible,
.hap-agent-chip:focus-visible,
.hap-vote-box:focus-visible,
.hap-inline-act:focus-visible,
.hap-spot-vote:focus-visible,
.hap-w-btn:focus-visible,
.hap-mini-btn:focus-visible,
.hap-code-tab:focus-visible,
.hap-clone-pill:focus-visible,
.hap-ws-btn:focus-visible,
.hap-ws-chip:focus-visible,
.hap-dock-tab:focus-visible,
.hap-icon-btn:focus-visible,
.hap-foot-btn:focus-visible,
.bsk-tile-up:focus-visible,
.bsk-cli-btn:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .hap-nav-btn,
    .hap-primary-cta,
    .hap-agent-chip,
    .hap-row,
    .hap-vote-box,
    .hap-spot-vote,
    .hap-w-row,
    .hap-clone-pill,
    .hap-ws-prog-fill,
    .hap-toast,
    .hap-is-pop {
        transition-duration: 0.01ms !important;
        transform: none !important;
    }
}
