/* Skill list: concise cards and a distinct, curated repost collection. */
.skill-card{position:relative}
.skill-card .skill-top{display:contents!important}
.skill-card .skill-top h3,.skill-card .skill-top .icon,.skill-card .skill-top .skill-locator{display:none!important}
html body .skill-card .card-open{position:absolute;top:14px;right:14px;display:grid!important;place-items:center;z-index:2;width:38px;height:38px;padding:0;border:1px solid rgba(255,255,255,.25);border-radius:10px;background:#191919;color:#fff;text-decoration:none}
html body .skill-card .card-favorite.is-favorite,html body .skill-card .card-favorite:hover{background:#a51d2d;color:#fff}
.skill-card .skill-function-label{margin-bottom:20px}
.skill-card .skill-author-row{margin-top:auto}
.reposted-strip{scroll-margin-top:96px}
.reposted-strip .strip-head{gap:16px;flex-wrap:wrap}
.skill-repost-count{color:var(--muted,#888);font-size:13px;font-weight:400}
.reposted-empty{padding:26px 20px;border:1px solid rgba(150,150,140,.22);border-radius:12px;color:var(--muted,#888);font-size:14px}
/* Keep the download next to the detail tabs, with an unmistakable primary action. */
.skill-detail-toolbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:32px 0 0}
.skill-detail-toolbar .skill-tabs{margin:0!important;flex:0 1 auto;min-width:0;max-width:100%}
.skill-detail-toolbar .skill-download-primary{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:12px 26px;margin:0!important;border:1px solid #c72b38;border-radius:12px;background:#a51d2d!important;color:#fff!important;box-shadow:0 0 0 3px rgba(165,29,45,.13);font:inherit;font-size:14px;font-weight:700;line-height:1.4;text-decoration:none;white-space:nowrap}
.skill-download-primary::before{content:'↓';font-size:22px;line-height:1}
.skill-download-primary:hover{background:#c12b3d!important;box-shadow:0 0 0 4px rgba(165,29,45,.2)}
.skill-download-primary:focus-visible{outline:3px solid #e6b8bd;outline-offset:4px}
.skill-download-primary[aria-disabled="true"]{opacity:.5;pointer-events:none;cursor:wait;box-shadow:none}
@media(max-width:600px){.skill-detail-toolbar{gap:12px}.skill-detail-toolbar .skill-tabs{flex:1 0 100%;justify-content:space-between;gap:10px}.skill-detail-toolbar .skill-download-primary{width:100%;min-height:48px}}

/* A short, authored summary and direct download replace the long card description. */
body .skill-card .skill-function-label{margin-bottom:8px}
.skill-card-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 22px 18px;min-width:0}
.skill-brief{flex:1;min-width:0;margin:0;color:var(--muted,#aaa);font-size:13px;line-height:1.7;overflow-wrap:anywhere}
html body .skill-card-download{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex-shrink:0;min-height:40px;padding:9px 13px;border:1px solid #c72b38;border-radius:8px;background:#a51d2d;color:#fff!important;font-size:12px;font-weight:700;text-decoration:none}
html body .skill-card-download:hover{background:#c12b3d}
.skill-card-download:focus-visible{outline:3px solid #e6b8bd;outline-offset:3px}
html[data-theme="light"] .skill-brief{color:#555}

.skill-repost-source{margin-top:24px;padding:14px 18px;border-left:3px solid #a51d2d;background:rgba(165,29,45,.07);color:var(--muted,#999);font-size:13px;line-height:1.8;overflow-wrap:anywhere}

html body :is(#cards,#featuredGrid,#latestGrid,#repostedGrid) .skill-card .skill-function-label{min-height:0;margin-bottom:12px;padding-bottom:0}

.skill-density { display:inline-flex; align-items:center; gap:8px; margin-left:auto; font-size:14px }
.skill-density input[type="range"] { width:clamp(88px, 13vw, 144px); height:24px; margin:0; accent-color:#be2438; cursor:pointer }
.skill-density output { min-width:1.5em; text-align:center; font-variant-numeric:tabular-nums }
body #cards, body .feature-strip .featured-grid {
  grid-template-columns:repeat(min(var(--skill-columns,4),var(--screen-columns,5)),minmax(0,1fr));
}
@media (max-width:1050px) { .feature-strip,.library { --screen-columns:3 } }
@media (max-width:800px) { .feature-strip,.library { --screen-columns:2 } }
@media (max-width:600px) { .feature-strip,.library { --screen-columns:1 } }

.skill-upload-entry { display:inline-flex; align-items:center; gap:6px; margin-top:16px; padding:10px 16px; border-radius:8px; background:#a51d2d; color:#fff; font-weight:700; text-decoration:none }
.skill-upload-entry:hover,.skill-upload-entry:focus-visible { background:#be2438; color:#fff }

/* Curated strips use five desktop slots independently of the main library picker. */
body .feature-strip .featured-grid{grid-template-columns:repeat(min(5,var(--screen-columns,5)),minmax(0,1fr))}
.feature-strip .skill-card-actions{flex-direction:column;align-items:stretch;gap:10px;margin:0 16px 16px}
.feature-strip .skill-card-download{width:100%}
body .feature-strip .skill-function-label{padding:16px 16px 0;font-size:16px}
.skill-source-file{margin:0 16px 12px;color:var(--muted,#999);font:10px/1.5 monospace;overflow-wrap:anywhere}

.library-head{flex-wrap:wrap;gap:12px}

html[data-skill-view="saved"] .wb-showcase,html[data-skill-view="saved"] .feature-strip,html[data-skill-view="saved"] .hero{display:none!important}
.skill-saved-state{padding:28px;border:1px solid var(--line);border-radius:12px;line-height:1.8}.skill-saved-state a{color:inherit;text-underline-offset:4px}

.feature-strip .skill-card-footer{display:flex;flex-wrap:wrap;padding:10px 16px 16px;gap:6px}
.feature-strip .skill-card-footer .skill-category-glyph{display:none}
.feature-strip .skill-card-engagement{flex:1 0 100%;justify-content:space-between}

.feature-strip .skill-brief{min-height:3.4em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html body .feature-strip .skill-card .skill-function-label{min-height:calc(2.8em + 16px)!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

html:not([data-skill-view="reposted"]) #repostedSection { display: none; }
html[data-skill-view="reposted"] :is(.wb-showcase, .hero, #featuredSection, #latestSection, #skillLibrary) { display: none !important; }
html[data-skill-view="reposted"] #repostedSection { margin-top: 48px; min-height: 60vh; }

.skill-home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.skill-home-actions .skill-upload-entry { margin-top: 0; }
.skill-reposted-entry { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid currentColor; border-radius: 8px; color: inherit; font-weight: 700; text-decoration: none; }
.skill-reposted-entry:hover, .skill-reposted-entry:focus-visible { color: #bd3343; }
