/* Source Hub — Mihon-style browser (scoped, additive) */
.sh-hero{
  padding: clamp(1.25rem,4vw,2rem) clamp(1rem,3vw,1.5rem);
  margin-bottom: var(--space-lg,1.5rem);
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--accent,#7c5cff) 18%, transparent), transparent 55%),
    linear-gradient(180deg, var(--bg-card,#14141c), color-mix(in oklab, var(--bg-card,#14141c) 92%, black));
  border: 1px solid color-mix(in oklab, var(--border,#2a2a36) 90%, transparent);
}
.sh-hero h1{font-size:clamp(1.35rem,2.4vw,1.875rem);font-weight:800;margin:0 0 .35rem;letter-spacing:-.02em}
.sh-hero p{color:var(--text-muted);margin:0;max-width:60ch}
.sh-hero .sh-hero-lede{color:var(--text-secondary,#c8c8d4);font-size:1rem;line-height:1.55;max-width:66ch;margin:.15rem 0 .9rem}
.sh-hero-list{
  list-style:none;padding:0;margin:.25rem 0 .9rem;
  display:grid;gap:.5rem;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  max-width:820px;
}
.sh-hero-list li{
  display:flex;gap:.6rem;align-items:flex-start;
  padding:.55rem .75rem;border-radius:10px;
  background:color-mix(in oklab, var(--accent,#7c5cff) 8%, transparent);
  border:1px solid color-mix(in oklab, var(--accent,#7c5cff) 25%, transparent);
  color:var(--text-secondary,#c8c8d4);font-size:.9rem;line-height:1.4;
}
.sh-hero-list li i{color:var(--accent,#7c5cff);margin-top:.15rem;width:1.1em;text-align:center;flex:0 0 auto}
.sh-hero-note{color:var(--text-muted);font-size:.85rem;margin:.25rem 0 0}
.sh-hero-note a{color:var(--accent,#7c5cff);text-decoration:none}
.sh-hero-note a:hover{text-decoration:underline}

.sh-search{position:relative;margin:1rem 0 1.5rem;max-width:640px}
.sh-search input{
  width:100%;height:44px;padding:0 1rem 0 2.75rem;border-radius:999px;
  border:1px solid var(--border,#2a2a36);background:var(--bg-elev,#0f0f17);
  color:var(--text-primary);font-size:.95rem;
}
.sh-search i{position:absolute;left:1rem;top:50%;transform:translateY(-50%);color:var(--text-muted)}

.sh-sources-grid{
  display:grid;gap:.9rem;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
}
.sh-source-card{
  display:flex;flex-direction:column;align-items:center;gap:.65rem;
  padding:1.1rem .75rem;background:var(--bg-card,#14141c);
  border:1px solid var(--border,#2a2a36);border-radius:14px;
  cursor:pointer;transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  text-decoration:none;color:inherit;text-align:center;
}
.sh-source-card:hover{transform:translateY(-2px);border-color:var(--accent,#7c5cff);box-shadow:0 8px 24px -10px rgba(124,92,255,.4)}
.sh-source-logo{
  width:56px;height:56px;border-radius:14px;object-fit:contain;background:var(--bg-elev,#0f0f17);
  padding:8px;border:1px solid var(--border,#2a2a36);
}
.sh-source-logo.sh-fallback{display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--accent,#7c5cff);font-size:1.35rem}
.sh-source-name{font-weight:700;font-size:.95rem;line-height:1.2}
.sh-source-domain{color:var(--text-muted);font-size:.78rem;word-break:break-all}

/* series grid */
.sh-series-grid{
  display:grid;gap:1rem;
  grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
}
@media (max-width:520px){
  .sh-series-grid{grid-template-columns:repeat(2,1fr);gap:.75rem}
}
.sh-series-card{
  display:flex;flex-direction:column;gap:.5rem;text-decoration:none;color:inherit;
  border-radius:12px;overflow:hidden;background:var(--bg-card,#14141c);
  border:1px solid var(--border,#2a2a36);transition:transform .15s ease, border-color .15s ease;
}
.sh-series-card:hover{transform:translateY(-2px);border-color:var(--accent,#7c5cff)}
.sh-series-cover{aspect-ratio:2/3;overflow:hidden;background:var(--bg-elev,#0f0f17)}
.sh-series-cover img{width:100%;height:100%;object-fit:cover;display:block}
.sh-series-body{padding:.5rem .65rem .75rem}
.sh-series-title{font-weight:600;font-size:.9rem;line-height:1.25;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sh-series-meta{margin-top:.25rem;color:var(--text-muted);font-size:.75rem;
  display:flex;gap:.4rem;align-items:center;flex-wrap:wrap}
.sh-badge{display:inline-block;padding:1px 6px;border-radius:999px;
  background:color-mix(in oklab,var(--accent,#7c5cff) 15%,transparent);color:var(--accent,#7c5cff);
  font-size:.7rem;font-weight:600}

/* details */
.sh-details-head{display:grid;grid-template-columns:180px 1fr;gap:1.25rem;margin-bottom:1.5rem}
@media (max-width:640px){.sh-details-head{grid-template-columns:120px 1fr;gap:1rem}}
.sh-details-cover{aspect-ratio:2/3;border-radius:12px;overflow:hidden;background:var(--bg-elev,#0f0f17);border:1px solid var(--border,#2a2a36)}
.sh-details-cover img{width:100%;height:100%;object-fit:cover;display:block}
.sh-details-title{font-size:clamp(1.25rem,3vw,1.9rem);font-weight:800;margin:0 0 .5rem;line-height:1.15}
.sh-details-meta{display:flex;flex-wrap:wrap;gap:.4rem .8rem;color:var(--text-muted);font-size:.9rem;margin-bottom:.75rem}
.sh-details-desc{color:var(--text-secondary,#c8c8d3);line-height:1.55;font-size:.95rem;white-space:pre-wrap}

.sh-chapter-list{display:flex;flex-direction:column;border:1px solid var(--border,#2a2a36);border-radius:12px;overflow:hidden;margin-top:1rem}
.sh-chapter-row{
  display:flex;justify-content:space-between;align-items:center;gap:1rem;
  padding:.85rem 1rem;background:var(--bg-card,#14141c);
  border-bottom:1px solid var(--border,#2a2a36);
  text-decoration:none;color:inherit;transition:background .12s ease;
}
.sh-chapter-row:last-child{border-bottom:none}
.sh-chapter-row:hover{background:color-mix(in oklab,var(--accent,#7c5cff) 8%,var(--bg-card,#14141c))}
.sh-chapter-num{font-weight:700}
.sh-chapter-title{color:var(--text-muted);font-size:.85rem;text-align:right}

/* loading & empty */
.sh-loader{display:flex;align-items:center;justify-content:center;gap:.6rem;padding:2rem;color:var(--text-muted)}
.sh-spinner{width:22px;height:22px;border-radius:50%;
  border:3px solid var(--border,#2a2a36);border-top-color:var(--accent,#7c5cff);
  animation:sh-spin .8s linear infinite}
@keyframes sh-spin{to{transform:rotate(360deg)}}
.sh-empty{text-align:center;padding:3rem 1rem;color:var(--text-muted)}
.sh-empty i{font-size:2.5rem;margin-bottom:.75rem;color:var(--accent,#7c5cff);opacity:.6}

/* reader */
.sh-reader-topbar{
  position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:.75rem;
  padding:.75rem 1rem;background:color-mix(in oklab,var(--bg,#0a0a0f) 92%,transparent);
  backdrop-filter:blur(10px);border-bottom:1px solid var(--border,#2a2a36);
}
.sh-reader-topbar .sh-title{font-weight:700;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sh-reader-images{max-width:900px;margin:0 auto;padding:0;font-size:0;line-height:0}
.sh-reader-images img{display:block;width:100%;height:auto}
.sh-reader-nav{
  display:flex;gap:.75rem;justify-content:center;padding:1.5rem 1rem;
  max-width:900px;margin:0 auto;
}
.sh-reader-nav .btn{flex:1;max-width:200px}

/* View counter + filter tabs (added by Sources feature fixes) */
.sh-source-views{color:var(--text-muted);font-size:.8rem;display:inline-flex;align-items:center;gap:.35rem}
.sh-source-views i{color:var(--accent,#7c5cff)}
.sh-tabs{display:flex;gap:.5rem;flex-wrap:wrap;margin:0 0 1rem}
.sh-tab{background:transparent;border:1px solid var(--border,#2a2a35);color:var(--text-muted);padding:.45rem .9rem;border-radius:999px;cursor:pointer;font-size:.85rem;font-weight:600;transition:all .15s}
.sh-tab:hover{color:var(--text)}
.sh-tab.active{background:var(--accent,#7c5cff);border-color:var(--accent,#7c5cff);color:#fff}
.sh-series-title{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-weight:600}

/* ------------------------------------------------------------
   Direct Link button (source-series.html)
   Only rendered when the Source Plugin exposes the optional
   Direct Link capability — see js/source-direct-link.js.
   ------------------------------------------------------------ */
.sh-direct-link {
  text-decoration: none;
}
.sh-direct-link:hover {
  color: var(--primary, #7c5cff);
  border-color: var(--primary, #7c5cff);
}
