/* ============================================================
   Astra Origins — Industry Resources (External Links · §08)
   Page-only styles, layered on cosmos.css design tokens.
   Self-contained banner + skeleton loaders + infinite scroll.
   ============================================================ */

/* ── Section banner ─────────────────────────────────────── */
.el-banner {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 26px 26px 24px;
  margin-bottom: 18px;
  background:
    radial-gradient(ellipse at 80% -10%, oklch(0.5 0.14 200 / 0.45), transparent 60%),
    radial-gradient(ellipse at 0% 120%, oklch(0.45 0.16 290 / 0.35), transparent 55%),
    linear-gradient(135deg, oklch(0.22 0.04 250), oklch(0.14 0.03 260));
  border: 1px solid var(--line);
}
.el-banner-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff 100%, transparent),
    radial-gradient(1px 1px at 70% 60%, #fff 100%, transparent),
    radial-gradient(1px 1px at 45% 80%, #fff 100%, transparent),
    radial-gradient(1.5px 1.5px at 85% 20%, #fff 100%, transparent),
    radial-gradient(1px 1px at 30% 65%, #fff 100%, transparent);
  opacity: 0.5;
  animation: el-twinkle 6s ease-in-out infinite alternate;
}
@keyframes el-twinkle { from { opacity: 0.32; } to { opacity: 0.6; } }
.el-banner-body { position: relative; }
.el-banner-eye {
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
  color: oklch(0.82 0.08 200);
}
.el-banner-title {
  margin: 8px 0 6px;
  font-size: clamp(20px, 3vw, 28px); font-weight: 800;
  letter-spacing: -0.02em; color: #fff; line-height: 1.15;
}
.el-banner-sub {
  margin: 0; max-width: 60ch;
  font-size: 13px; line-height: 1.5; color: oklch(0.85 0.01 240 / 0.85);
}

/* ── Category chips ─────────────────────────────────────── */
.el-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.el-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--ink-2);
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.el-chip .bi { font-size: 13px; }
.el-chip:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.el-chip.is-on { background: var(--ink); color: white; border-color: var(--ink); }
.el-chip .ct { font-size: 9px; color: var(--ink-3); letter-spacing: 0.04em; }
.el-chip.is-on .ct { color: oklch(0.75 0.005 240); }

/* ── Resource grid ──────────────────────────────────────── */
.el-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.el-card {
  display: grid;
  grid-template-columns: 48px 1fr 16px;
  align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none; color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  animation: el-fade-in 0.32s ease both;
}
@keyframes el-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.el-card:hover,
.el-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  box-shadow: 0 12px 28px oklch(0 0 0 / 0.1);
  outline: none;
}
.el-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.el-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; color: white; font-size: 22px;
}
.el-card-body { min-width: 0; }
.el-card-title {
  display: block; font-size: 14px; font-weight: 800;
  letter-spacing: -0.005em; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.el-card-sub {
  display: block; font-size: 10px; color: var(--ink-3);
  letter-spacing: 0.08em; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.el-card-ext { color: var(--ink-3); display: inline-flex; font-size: 13px; }
.el-card:hover .el-card-ext { color: var(--accent); }

/* ── Loader / states ────────────────────────────────────── */
.el-loader {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 22px; font-size: 11px; letter-spacing: 0.16em; color: var(--ink-3);
}
.el-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--accent);
  animation: el-spin 0.7s linear infinite;
}
@keyframes el-spin { to { transform: rotate(360deg); } }
.el-state {
  padding: 28px; text-align: center;
  font-size: 11px; color: var(--ink-3); letter-spacing: 0.16em;
  background: var(--surface-2); border: 1px dashed var(--line);
  border-radius: 10px; margin-top: 6px;
}
.el-sentinel { height: 1px; }

/* ── Skeleton placeholders (shown during a fresh load) ──── */
.el-skel {
  display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.el-sk { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 6px; }
.el-sk::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.06), transparent);
  transform: translateX(-100%); animation: el-shimmer 1.3s infinite;
}
@keyframes el-shimmer { to { transform: translateX(100%); } }
.el-sk-icon { width: 48px; height: 48px; border-radius: 12px; }
.el-sk-line { height: 12px; width: 70%; margin-bottom: 8px; }
.el-sk-line.sm { height: 9px; width: 45%; margin-bottom: 0; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) { .el-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .el-chip { padding: 7px 11px; font-size: 11px; }
  .el-card { grid-template-columns: 40px 1fr 16px; gap: 10px; }
  .el-card-icon { width: 40px; height: 40px; font-size: 18px; }
}
