/* ═══════════════════════════════════════════════════════════════════
   ink-ls · Main
   GitHub-style endpoint list. Sidebar lives on the left (from
   Sidebar); content fills the remaining viewport with the API
   list center, right-side Quick-actions card.
   ═══════════════════════════════════════════════════════════════════ */

/* The legacy `.home` rule (dead — no element uses this class) used to live
   here; layout math is on `.home-content-wrap` now. */

.home-content-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 24px;
  padding: 20px 28px;
  max-width: 1320px;
  margin: 0 auto;
  overflow: hidden;
}

/* ── Sidebar filters (left) ──────────────────────────────────────── */
.tag-sidebar-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.tag-filter {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  font-size: 12px;
  color: var(--fg-soft);
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.1s, color 0.1s;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
}
.tag-filter:hover { background: var(--bg-elev-hover); color: var(--fg); }
.tag-filter.active { background: rgba(0, 81, 255, 0.1); color: var(--accent-light); }

.custom-tag-input {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
  height: 24px;
}
.custom-tag-input input {
  flex: 1;
  min-width: 0;
  padding: 0 6px;
  font-size: 10px;
  color: var(--fg);
  background: var(--bg);
  border: none;
  outline: none;
  font-family: inherit;
}
.custom-tag-input input::placeholder { color: var(--subtle); }
.custom-tag-input:focus-within { border-color: var(--accent); }
.custom-tag-input button {
  padding: 0 8px;
  background: var(--raised);
  border: none;
  border-left: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}
.custom-tag-input button:hover { color: var(--accent); background: var(--hover); }

.custom-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 2em;
  margin: 0 3px 3px 0;
  cursor: default;
}
.custom-tag-pill-x { cursor: pointer; opacity: 0.6; font-size: 11px; }
.custom-tag-pill-x:hover { opacity: 1; }

.side-btn {
  display: block;
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  margin-bottom: 4px;
  transition:
    transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.side-btn:hover {
  background: var(--hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}
.side-btn:active { transform: translateY(1px); box-shadow: none; filter: brightness(0.85); }
.side-btn-danger { color: var(--red); }
.side-btn-danger:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 2px 10px rgba(248, 81, 73, 0.25);
}

.tag-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tag-count { font-size: 10px; color: var(--subtle); margin-left: auto; }

/* ── Host / Client app shortcut buttons ──────────────────────────── */
.sb-app-row { display: flex; gap: 7px; margin: 8px 0; }
.sb-app-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.sb-app-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.sb-app-btn-img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.sb-app-btn:hover  { transform: translateY(-1px); text-decoration: none; }
.sb-app-btn:active { transform: translateY(0); filter: brightness(0.9); }

.sb-app-host {
  background: rgba(0, 81, 255, 0.1);
  border-color: rgba(0, 81, 255, 0.28);
  color: var(--accent-light);
}
.sb-app-host:hover {
  background: rgba(0, 81, 255, 0.18);
  border-color: rgba(0, 81, 255, 0.45);
  color: #fff;
}
.sb-app-client {
  background: rgba(163, 113, 247, 0.1);
  border-color: rgba(163, 113, 247, 0.3);
  color: #c4a1fb;
}
.sb-app-client:hover {
  background: rgba(163, 113, 247, 0.18);
  border-color: rgba(163, 113, 247, 0.48);
  color: #fff;
}

/* ── Center column ───────────────────────────────────────────────── */
.home-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

/* Search + filter bar (lives in topbar_middle slot, centered). */
.home-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto;
}
.home-search-wrap { position: relative; width: 280px; }
.home-search-icon {
  position: absolute;
  left: 10px;
  /* Center vertically WITHOUT transform: translateY — frees up the
     transform property for the hover-zoom transition. */
  top: calc(50% - 7px);
  width: 14px;
  height: 14px;
  color: var(--fg-subtle);
  pointer-events: none;
  transform-origin: center;
  /* The zoom is a transition (not an animation) so it HOLDS the zoomed
     state while hover/focus is active, then smoothly reverses on
     hover-out. Lens scales inside the SVG also use transition for the
     same hold-while-hovered behaviour. */
  transition: transform 380ms cubic-bezier(0.4, 0, 0.2, 1);
}
.home-search-icon * { transform-box: fill-box; transform-origin: center; transition: transform 380ms cubic-bezier(0.4, 0, 0.2, 1), opacity 380ms ease; }

/* Magnifying-glass hover animation — reusable search-themed motion.
   ZOOM held via CSS transition (stays zoomed while hovered/focused,
   smoothly returns when the cursor leaves or focus moves away).
   SHINE is a one-shot animation that flashes on hover/focus-in and
   settles back to invisible — a reflection is a moment, not a state. */
.home-search-wrap:hover .ico-magnify,
.home-search-wrap:focus-within .ico-magnify {
  transform: scale(1.2) rotate(-4deg);
}
.home-search-wrap:hover .ico-magnify .magnify-lens,
.home-search-wrap:focus-within .ico-magnify .magnify-lens {
  transform: scale(1.08);
}

/* Shines invisible by default; on hover/focus they grow + fade in and
   STAY visible. On hover/focus-out they fade smoothly back. */
.ico-magnify .magnify-shine,
.ico-magnify .magnify-shine-dot {
  opacity: 0;
  transform: scale(0.5);
}
.home-search-wrap:hover .ico-magnify .magnify-shine,
.home-search-wrap:focus-within .ico-magnify .magnify-shine,
.home-search-wrap:hover .ico-magnify .magnify-shine-dot,
.home-search-wrap:focus-within .ico-magnify .magnify-shine-dot {
  opacity: 1;
  transform: scale(1.35);
}
.home-search {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px 5px 30px;
  color: var(--fg);
  font-size: 12.5px;
  outline: none;
}
.home-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 81, 255, 0.1);
}
.filter-btn {
  padding: 5px 11px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--fg-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  min-width: max-content;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-btn:hover  { background: var(--bg-hover); color: var(--fg); }
.filter-btn.active { color: #fff; background: var(--accent); border-color: var(--accent); }

.toolbar-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; flex-shrink: 0; }

/* ── Endpoint list summary header ────────────────────────────────── */
.ep-summary {
  padding: 8px 4px 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-muted);
  font-size: 13px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ep-summary-label b { color: var(--fg); font-weight: 600; }
.ep-summary-dot   { color: var(--fg-subtle); }
.ep-summary-online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-weight: 500;
}
.ep-summary-online::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 5px var(--green);
}

/* ── Endpoint list (fused rows, GitHub-style) ────────────────────── */
.ep-scroll {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
}

.ep-repo {
  position: relative;
  display: block;
  border: none;
  border-top: 1px solid var(--border-muted);
  border-radius: 0;
  background: transparent;
  padding: 18px 22px 18px 24px;
  margin: 0;
  cursor: pointer;
  transition: background 0.12s;
  min-width: 0;
}
.ep-repo:first-child { border-top: none; }
/* Subtle zebra striping. */
.ep-repo:nth-child(even) { background: rgba(255, 255, 255, 0.012); }

/* Left accent stripe appears on hover. */
.ep-repo::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: transparent;
  transition: background 0.15s;
}
.ep-repo:hover { background: var(--bg-elev); }
.ep-repo:hover::before { background: var(--accent); }

.ep-card-head {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ep-card-head-left {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ep-card-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}
.ep-repo-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.ep-repo-badge {
  font-size: 10.5px;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 2em;
  padding: 1px 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ep-card-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  min-width: 0;
}
.ep-info { flex: 1 1 0; min-width: 0; overflow: hidden; }

.ep-tag {
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 2em;
  color: #fff;
}
.ep-repo-desc {
  font-size: 13.5px;
  color: var(--fg-soft);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.45;
}
.ep-repo-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--fg-subtle);
  flex-wrap: wrap;
}
.ep-repo-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ep-repo-dot.on  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.ep-repo-dot.off { background: var(--fg-subtle); }
.ep-repo-owner { color: var(--fg-muted); }

.ep-spark { width: 120px; height: 36px; flex-shrink: 0; }

.status-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.status-badge.on  { background: rgba(63, 185, 80, 0.15); color: #3fb950; border: 1px solid rgba(63, 185, 80, 0.3); }
.status-badge.off { background: rgba(110, 118, 129, 0.1); color: var(--subtle); border: 1px solid var(--border); }

.ep-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  text-align: right;
}
.ep-right-stats {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--subtle);
  font-weight: 500;
}

/* v0.9 — per-row API/Host badge toggle. Online-only hamburger; sits at
   the head of the badge group inside .ep-repo-meta. Click swaps the
   visible badge group: .ep-badges-api (limit pills) ↔ .ep-badges-host
   (context / tools / format / parallel). Host caps fetched lazily. */
.ep-badge-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ep-badge-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-muted, #30363d);
  border-radius: 5px;
  color: var(--subtle, #8b949e);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.ep-badge-toggle:hover {
  color: var(--fg, #e6edf3);
  border-color: var(--accent, #6ea8fe);
  background: rgba(110, 168, 254, 0.08);
}
.ep-badge-group[data-mode="host"] .ep-badge-toggle {
  background: var(--accent, #6ea8fe);
  border-color: var(--accent, #6ea8fe);
  color: var(--bg, #0d1117);
}
.ep-badge-toggle svg { display: block; }
.ep-badges-host { display: inline-flex; gap: 4px; }

.chat-now-btn {
  font-size: 11px;
  padding: 4px 12px;
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  transition: all 0.15s;
}
.chat-now-btn:hover { background: #0046d9; transform: translateY(-1px); }

.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 13px; }

/* ── Right-side cards ────────────────────────────────────────────── */
.home-side { width: 250px; flex-shrink: 0; overflow: visible; }

.side-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  background: var(--bg-surface);
  overflow: hidden;
  position: relative;
}
.side-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  pointer-events: none;
}

/* Quick Actions card holds the +New API dropdown which is taller than
   the card itself. `overflow:hidden` (used elsewhere to clip the
   ::before stripe to the rounded corners) clips the dropdown's bottom
   — disable both for this one card so the dropdown can escape. */
.home-side .side-card:first-of-type        { overflow: visible; }
.home-side .side-card:first-of-type::before { display: none; }

.side-card-head {
  padding: 11px 14px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
}
.side-card-head::before {
  content: '';
  width: 3px;
  height: 12px;
  border-radius: 1px;
  background: var(--accent);
}
.side-card-body { padding: 14px; }
.side-stat       { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; }
.side-stat-label { color: var(--muted); }
.side-stat-val   { color: var(--fg); font-weight: 500; }
.side-link       { display: block; padding: 4px 0; font-size: 13px; color: var(--accent); text-decoration: none; }
.side-link:hover { text-decoration: underline; }

/* ── New endpoint group ──────────────────────────────────────────── */
.new-ep-group {
  display: flex;
  width: 100%;
  margin-bottom: 6px;
  max-width: 100%;
  overflow: hidden;
}
.new-ep-input {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  font-size: 11px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  outline: none;
  font-family: inherit;
  height: 28px;
}
.new-ep-input:focus { border-color: var(--accent); }
.new-ep-input::placeholder { color: var(--subtle); }
.new-ep-btn {
  padding: 0 10px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  transition:
    transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.15s ease,
    box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #fff;
  font-family: inherit;
  white-space: nowrap;
  height: 28px;
  flex-shrink: 0;
}
.new-ep-btn:hover  { background: #0046d9; box-shadow: 0 2px 8px rgba(0, 81, 255, 0.3); }
.new-ep-btn:active { filter: brightness(0.85); }

.new-vis-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--muted);
}
.new-vis-btn:hover  { color: var(--fg); transform: translateY(-1px); }
.new-vis-btn:active { transform: translateY(1px); filter: brightness(0.85); }
.new-vis-btn.active-public  { background: #438440; border-color: #438440; color: #fff; }
.new-vis-btn.active-private { background: var(--raised); border-color: var(--subtle); color: var(--fg); }

/* ── "I'm lost — open the guide" CTA ─────────────────────────────── */
.btn-lost {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 8px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #2a6fff);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  overflow: hidden;
  animation: btnLostPulse 3.6s ease-in-out infinite;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease;
}
.btn-lost-ico { flex-shrink: 0; }
.btn-lost::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 55%;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
  transform: skewX(-16deg);
  animation: btnLostSheen 5s ease-in-out infinite;
  pointer-events: none;
}
.btn-lost:hover {
  animation: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 81, 255, 0.35);
  text-decoration: none;
}
.btn-lost:hover::after { animation: none; }
.btn-lost:active { transform: translateY(1px); filter: brightness(0.85); }

@keyframes btnLostPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 81, 255, 0.25); }
  50%      { box-shadow: 0 0 0 4px rgba(0, 81, 255, 0); }
}
@keyframes btnLostSheen {
  0%   { left: -60%; }
  55%  { left: 130%; }
  100% { left: 130%; }
}

.btn-tut {
  width: 100%;
  margin-top: 4px;
  padding: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition:
    transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}
.btn-tut:hover  { background: var(--hover); color: var(--fg); transform: translateY(-1px); }
.btn-tut:active { transform: translateY(1px); filter: brightness(0.85); }

/* ── Tutorial spotlight ──────────────────────────────────────────── */
.tut-tip {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  width: 280px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.tut-tip-step {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.tut-tip-title { font-size: 14px; font-weight: 700; color: var(--fg); margin-bottom: 4px; }
.tut-tip-desc  { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.tut-tip-footer { display: flex; justify-content: space-between; }

/* ── Mobile (≤900px) ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Pull the topbar's search + filter row out of the topbar and pin it
     as a fixed strip directly below it, so the filters are always visible
     and tappable. Same DOM, same JS — only positioning changes. */
  .topbarMid {
    position: fixed;
    left: 0; right: 0;
    top: var(--topbar-height);
    height: 48px;
    z-index: 99;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border-strong);
    padding: 0 10px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .topbarMid::-webkit-scrollbar { display: none; }
  .home-toolbar    { flex-wrap: nowrap; gap: 6px; margin: 0; padding: 8px 0; }
  .home-search-wrap { width: 160px; flex-shrink: 0; }
  .filter-btn      { flex-shrink: 0; white-space: nowrap; }
  .toolbar-sep     { flex-shrink: 0; }

  /* Lock the page so only the API list scrolls. The 48px top padding
     clears the fixed topbarMid strip; bottom-nav clearance is handled
     by Sidebar's `.ink-page` padding-bottom. Overflow stays
     `visible` so the +New dropdown can extend past the sidebar strip;
     the inner `.home-main` clips the API list independently. */
  .home-tags { display: none; }
  .home-content-wrap {
    flex-direction: column;
    padding: 48px 0 0;
    max-width: 100%;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow: visible;
  }
  .home-side {
    width: 100%;
    order: -1;
    padding: 10px 12px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border-strong);
    overflow: visible;
  }
  /* Stack above `.ink-bottom-nav` (90) and topbarMid (99). */
  #newEpDrop { z-index: 200 !important; }

  .home-side .side-card { background: transparent; border: none; padding: 0; }
  .home-side .side-card::before { display: none; }
  .home-side .side-card-head { display: none; }
  /* 2-column grid: input row spans full width, then Client app +
     Open-guide sit side-by-side underneath. */
  .home-side .side-card-body {
    padding: 0;
    overflow: visible;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .home-side .side-card-body > div:first-child { grid-column: 1 / -1; }

  /* Hide what doesn't belong on mobile. */
  .home-side .side-card:nth-of-type(2),  /* API Key card */
  .home-side .sb-app-host,               /* Hosting not supported on mobile */
  .home-side .btn-tut { display: none; } /* Tutorial button */

  .new-ep-group { width: 100%; }
  .new-ep-input { font-size: 13px; height: 36px; }
  .new-ep-btn   { height: 36px; font-size: 13px; padding: 0 14px; }

  .home-side .sb-app-row { margin: 0; gap: 6px; }
  .home-side .sb-app-btn { flex: 1; padding: 7px 10px; font-size: 12px; height: 34px; }
  .home-side .sb-app-btn-img { width: 14px; height: 14px; }
  .home-side .btn-lost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }
  .home-side .btn-lost::after { display: none; }

  .home-main { flex: 1; min-height: 0; overflow: hidden; }
  #homeContent, #homeGhost { flex: 1; min-height: 0; }
  .ep-scroll, #epScroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 12px; }
  .ep-summary { padding: 8px 12px; margin: 0; border-bottom: 1px solid var(--border-muted); }
  .ep-spark, .ep-right-col { display: none; }
  .ep-card-head { gap: 6px 8px; }
  .ep-card-head-right { width: 100%; justify-content: flex-start; }
  .ep-repo-name { font-size: 15px; }
  .ep-repo-desc { font-size: 13px; white-space: normal; }
  .ep-repo-meta { font-size: 11.5px; gap: 8px 14px; row-gap: 4px; }
  .chat-now-btn { padding: 6px 14px; font-size: 12px; }
}
@media (max-width: 480px) {
  .ep-repo-name { max-width: 200px; }
}

/* ── Misc ──────────────────────────────────────────────────────── */
.report-mini-btn {
  font-size: 10px;
  color: var(--subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  cursor: pointer;
  background: none;
  margin-left: 8px;
  opacity: 0;
  transition: all 0.1s;
}
.ep-repo:hover .report-mini-btn { opacity: 1; }
.report-mini-btn:hover { color: var(--red); border-color: var(--red); }

/* ── Limit pills (also used on Api dashboard) ────────────────────── */
.lim-pills {
  display: inline-flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}
.lim-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 2em;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  white-space: nowrap;
}
.lim-pill svg    { width: 9px; height: 9px; color: var(--accent); flex-shrink: 0; }
.lim-pill b      { color: var(--fg); font-weight: 700; }
.lim-pill.cp svg { color: #d29922; }
.lim-pill.global svg { color: #3fb950; }
.lim-pill.off    { opacity: 0.55; }

/* v0.9 — Host capability pills. Built by Main.js's LoadEpHostCaps; live
   inside .ep-badges-host. Each .host-cap kind gets its own icon color
   (so the hamburger swap reads as "different topic"); each pill's
   ✓ / ✗ value is colored by a state class .cap-yes / .cap-no /
   .cap-unknown / .cap-loading. */
.lim-pill.host-cap          { /* base — inherits .lim-pill */ }
.lim-pill.host-ctx   svg    { color: #58a6ff; }            /* ctx — blue */
.lim-pill.host-tools svg    { color: #d29922; }            /* tools — amber */
.lim-pill.host-fmt   svg    { color: #bc8cff; }            /* fmt — purple */
.lim-pill.host-par   svg    { color: #3fb950; }            /* parallel — green */
.lim-pill.cap-loading       { opacity: 0.55; }
.lim-pill.cap-loading b     { color: var(--muted); }
.lim-pill.cap-unknown       { opacity: 0.7; }
.lim-pill.cap-unknown b     { color: var(--muted); }
.lim-pill.cap-yes b         { color: #3fb950; }            /* ✓ green */
.lim-pill.cap-no            { opacity: 0.65; }
.lim-pill.cap-no b          { color: #f85149; }            /* ✗ red */
.lim-pill.cap-no svg        { opacity: 0.5; }              /* dim icon when not supported */

/* ── Marketplace badges ──────────────────────────────────────────── */
.price-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2em;
  background: rgba(63, 185, 80, 0.12);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.25);
}
.price-pill.free {
  background: rgba(110, 118, 129, 0.08);
  color: var(--fg-subtle);
  border-color: var(--border);
}
.capacity-warn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 2em;
  background: rgba(210, 153, 34, 0.12);
  color: #d29922;
  border: 1px solid rgba(210, 153, 34, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sub-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  border: 1px solid;
  white-space: nowrap;
}
.sub-action-btn svg { flex-shrink: 0; }
.subscribe-btn {
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.15) 0%, rgba(63, 185, 80, 0.08) 100%);
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.3);
}
.subscribe-btn:hover {
  background: linear-gradient(135deg, #3fb950 0%, #2ea043 100%);
  color: #fff;
  border-color: #3fb950;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(63, 185, 80, 0.25);
}
.subscribe-btn:active { transform: translateY(0); box-shadow: none; }
.subscribe-btn.loading { opacity: 0.5; pointer-events: none; }
.unsubscribe-btn {
  background: linear-gradient(135deg, rgba(248, 81, 73, 0.12) 0%, rgba(248, 81, 73, 0.06) 100%);
  color: #f85149;
  border-color: rgba(248, 81, 73, 0.25);
}
.unsubscribe-btn:hover {
  background: linear-gradient(135deg, #f85149 0%, #da3633 100%);
  color: #fff;
  border-color: #f85149;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(248, 81, 73, 0.25);
}
.unsubscribe-btn:active { transform: translateY(0); box-shadow: none; }
.unsubscribe-btn.loading { opacity: 0.5; pointer-events: none; }

.sub-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--subtle);
  font-weight: 500;
}
.sub-count svg { color: var(--muted); opacity: 0.7; }

.side-filter-pill {
  padding: 5px 12px;
  border-radius: 2em;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.1s;
}
.side-filter-pill:hover { background: var(--bg-hover); color: var(--fg); }
.side-filter-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.report-global-drop {
  display: none;
  position: fixed;
  width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  text-align: left;
  cursor: default;
}
