
.rgt-tools-search{display:flex;justify-content:center;align-items:center;margin:20px 0}
.rgt-tools-wrap .rgt-pill-input{
  cursor:text;
  min-width:260px;
  max-width:420px;
  width:100%;
  padding-right:14px;
}
.rgt-tools-wrap .rgt-pill-input:focus{
  outline:2px solid rgba(17,24,39,.15);
  outline-offset:2px;
}
@media (max-width:520px){
  .rgt-tools-wrap .rgt-pill-input{min-width:0;max-width:100%}
}

.rgt-tools-wrap{max-width:1200px;margin:0 auto;padding:10px}
.rgt-filters{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;align-items:center;margin:10px 0 18px;position:relative;z-index:5;pointer-events:auto}
.rgt-tools-wrap .rgt-pill{
  border:1px solid var(--rgt-pill-border,#d7dbe3);
  background:var(--rgt-pill-bg,#fff);
  color:var(--rgt-pill-color,#111827);
  padding:10px 16px;
  border-radius:999px;
  font-weight:600;
  cursor:pointer;
  touch-action:manipulation;
  position:relative;
  z-index:6;
  pointer-events:auto;
}
.rgt-tools-wrap .rgt-pill:hover{
  border-color:var(--rgt-pill-hover-border,var(--rgt-pill-border,#d7dbe3));
  background:var(--rgt-pill-hover-bg,#f3f4f6);
  color:var(--rgt-pill-hover-color,var(--rgt-pill-color,#111827));
}
.rgt-tools-wrap .rgt-pill.is-active{
  border-color:var(--rgt-pill-active-border,#111827);
  background:var(--rgt-pill-active-bg,#111827);
  color:var(--rgt-pill-active-color,#fff);
}
/*
  Keep 4 columns on wide screens, but still center the last row when
  there are fewer tools than a full row.

  Flexbox gives predictable columns (4/3/2/1) and centers leftovers.
*/
.rgt-grid{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  justify-content:center;
}
.rgt-grid .rgt-card{
  flex:0 1 calc((100% - 54px) / 4);
  max-width:calc((100% - 54px) / 4);
}
@media (max-width:1100px){
  .rgt-grid .rgt-card{flex-basis:calc((100% - 36px) / 3);max-width:calc((100% - 36px) / 3);}
}
@media (max-width:820px){
  .rgt-grid .rgt-card{flex-basis:calc((100% - 18px) / 2);max-width:calc((100% - 18px) / 2);}
}
@media (max-width:520px){
  .rgt-grid .rgt-card{flex-basis:100%;max-width:100%;}

  /* Mobile: put icon + title on the same line to save vertical space */
  .rgt-card{
    /* Do NOT use !important here.
       Filtering sets inline display:none and must override mobile layout rules. */
    display:grid;
    grid-template-columns:48px 1fr;
    grid-template-areas:
      "icon title"
      "excerpt excerpt";
    column-gap:12px;
    row-gap:6px;
    align-items:center;
    padding:14px !important;
  }
  .rgt-icon{grid-area:icon;}
  .rgt-card h3{grid-area:title;margin:0 !important;}
  .rgt-card p{grid-area:excerpt;}
}
.rgt-card{display:block;border:1px solid #e5e7eb;border-radius:18px;padding:18px;text-decoration:none;background:var(--rgt-card-bg,#fff)}
.rgt-card h3{margin:10px 0 6px;font-size:var(--rgt-title-size,20px);color:var(--rgt-title-color,#111827)}
.rgt-card p{margin:0;color:var(--rgt-excerpt-color,#6b7280);line-height:1.4;font-size:var(--rgt-excerpt-size,16px)}
.rgt-icon{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--rgt-icon-bg,#f3f4f6);overflow:hidden}
.rgt-icon img{width:100%;height:100%;object-fit:cover}
.rgt-empty{padding:18px;border:1px dashed #e5e7eb;border-radius:18px;color:#6b7280}
