.jrk-categories {
  margin: 0 auto 28px;
  max-width: 1200px;
}
.jrk-cat-header {
  margin-bottom: 22px;
}
.jrk-cat-header h1 {
  margin: 0 0 8px;
  color: #0f172a;
}
.jrk-cat-header p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}
.jrk-cat-sub {
  margin-top: 6px !important;
  color: #94a3b8 !important;
}
.jrk-cat-back {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--jrk-brand, #0f766e);
  text-decoration: none;
  font-size: 13px;
}
.jrk-cat-back:hover {
  text-decoration: underline;
}

/* P0: overview bar */
.jrk-cat-overview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-bottom: 22px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f0fdfa 0%, #fff 100%);
  border: 1px solid #ccfbf1;
  border-radius: 12px;
}
.jrk-cat-overview-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.jrk-cat-overview-stat strong {
  font-size: 24px;
  line-height: 1.1;
  color: var(--jrk-brand, #0f766e);
}
.jrk-cat-overview-stat span {
  font-size: 12px;
  color: #64748b;
}
.jrk-cat-overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}
.jrk-cat-overview-links a {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--jrk-brand, #0f766e);
  background: #fff;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.jrk-cat-overview-links a:hover {
  background: #ecfdf5;
  border-color: var(--jrk-brand, #0f766e);
}

/* P2: hot picks */
.jrk-cat-hot {
  margin-bottom: 24px;
}
.jrk-cat-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.jrk-cat-section-hd h2 {
  margin: 0;
  font-size: 17px;
  color: #0f172a;
}
.jrk-cat-hot-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.jrk-cat-hot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: min(100%, 720px);
}
.jrk-cat-hot-card {
  min-width: 0;
}
.jrk-cat-hot-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.jrk-cat-hot-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}
.jrk-cat-hot-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.jrk-cat-hot-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.jrk-cat-hot-meta strong {
  margin: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* P1: 4-col grid */
.jrk-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.jrk-cat-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 22px;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.jrk-cat-card:hover {
  border-color: #a7f3d0;
  box-shadow: 0 4px 16px rgba(15, 118, 110, 0.08);
}
.jrk-cat-card-head {
  display: block;
  text-decoration: none;
  color: inherit;
}
.jrk-cat-card-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 10px;
}
.jrk-cat-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--jrk-brand, #0f766e);
}
.jrk-cat-card-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}
.jrk-cat-card-count {
  margin: 0 0 12px;
  font-size: 13px;
  color: #334155;
}
.jrk-cat-card-count strong {
  font-size: 22px;
  color: #0f172a;
  margin-right: 4px;
}

/* P0: enriched sample rows */
.jrk-cat-card-samples {
  margin: 0 0 14px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
.jrk-cat-sample-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  margin: 0 -6px;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  transition: background 0.15s;
}
.jrk-cat-sample-row:hover {
  background: #f8fafc;
}
.jrk-cat-sample-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f8fafc;
  overflow: hidden;
}
.jrk-cat-sample-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.jrk-cat-sample-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jrk-cat-card-more {
  display: inline-block;
  font-size: 13px;
  color: var(--jrk-brand, #0f766e);
  font-weight: 500;
  text-decoration: none;
}

/* P1: scenario links */
.jrk-cat-scenario {
  margin-bottom: 24px;
}
.jrk-cat-scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.jrk-cat-scenario-card {
  display: block;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.jrk-cat-scenario-card:hover {
  border-color: #a7f3d0;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.08);
}
.jrk-cat-scenario-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  color: var(--jrk-brand, #0f766e);
}
.jrk-cat-scenario-card span {
  display: block;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

/* P3: detail toolbar */
.jrk-cat-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.jrk-cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.jrk-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  color: #475569;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.jrk-cat-pill em {
  font-style: normal;
  font-size: 11px;
  color: #94a3b8;
}
.jrk-cat-pill:hover {
  border-color: #99f6e4;
  color: var(--jrk-brand, #0f766e);
}
.jrk-cat-pill.is-active {
  background: #ecfdf5;
  border-color: var(--jrk-brand, #0f766e);
  color: var(--jrk-brand, #0f766e);
  font-weight: 500;
}
.jrk-cat-pill.is-active em {
  color: var(--jrk-brand, #0f766e);
}
.jrk-cat-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
}
.jrk-cat-sort-link {
  padding: 4px 10px;
  color: #64748b;
  text-decoration: none;
  border-radius: 6px;
}
.jrk-cat-sort-link:hover {
  color: var(--jrk-brand, #0f766e);
}
.jrk-cat-sort-link.is-active {
  background: #ecfdf5;
  color: var(--jrk-brand, #0f766e);
  font-weight: 500;
}

.jrk-cat-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.jrk-cat-sw-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 76px;
}
.jrk-cat-sw-card:hover {
  border-color: #a7f3d0;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.08);
}
.jrk-cat-sw-card-body {
  flex: 1;
  min-width: 0;
}
.jrk-cat-sw-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}
.jrk-cat-sw-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--jrk-brand, #0f766e);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.jrk-cat-sw-card:hover .jrk-cat-sw-name {
  text-decoration: underline;
}
.jrk-cat-risk {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  flex-shrink: 0;
}
.jrk-cat-risk-mid {
  background: #fff7ed;
  color: #ea580c;
}
.jrk-cat-risk-high {
  background: #fef2f2;
  color: #dc2626;
}
.jrk-cat-risk-low {
  background: #ecfdf5;
  color: #059669;
}
.jrk-cat-sw-sum {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.jrk-cat-sw-card .jrk-cat-risk {
  flex-shrink: 0;
  font-size: 10px;
  padding: 2px 6px;
}

/* P3: pagination */
.jrk-cat-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}
.jrk-cat-page-btn {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--jrk-brand, #0f766e);
  background: #fff;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}
.jrk-cat-page-btn:hover {
  background: #ecfdf5;
}
.jrk-cat-page-info {
  font-size: 13px;
  color: #64748b;
}

.jrk-cat-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
}
.jrk-cat-foot a {
  color: var(--jrk-brand, #0f766e);
  text-decoration: none;
}
.jrk-cat-foot a:hover {
  text-decoration: underline;
}
.jrk-cat-sep {
  margin: 0 10px;
  color: #cbd5e1;
}

@media (max-width: 1024px) {
  .jrk-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .jrk-cat-scenario-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .jrk-cat-hot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .jrk-cat-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .jrk-cat-overview {
    flex-direction: column;
    align-items: flex-start;
  }
  .jrk-cat-overview-links {
    margin-left: 0;
    width: 100%;
  }
  .jrk-cat-grid {
    grid-template-columns: 1fr;
  }
  .jrk-cat-scenario-grid {
    grid-template-columns: 1fr;
  }
  .jrk-cat-hot-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    width: max-content;
    max-width: none;
  }
  .jrk-cat-detail-grid {
    grid-template-columns: 1fr;
  }
  .jrk-cat-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
