/* Catalog — Periodic lab. Isolated from stack drawers, salon ovals, abacus beads, typecase. */

body.el-lab.a71-body,
body.el-lab {
  --el-paper: #f4f1ea;
  --el-ink: #2a2e32;
  --el-mute: #5c636a;
  --el-purple: #6b4c9a;
  --el-ice: #8ecae6;
  --el-veg: #3d7a5a;
  --el-flw: #c45c8a;
  --el-for: #8a7a3a;
  --el-fru: #d4785a;
  --el-hrb: #4a7a8c;
  --el-spc: #8c4a3a;
  --el-display: "Alegreya", Georgia, serif;
  --el-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --el-ease: cubic-bezier(0.2, 0.85, 0.2, 1);
  margin: 0;
  color: var(--el-ink);
  font-family: var(--el-sans);
  background:
    radial-gradient(circle at 8% 12%, rgba(107, 76, 154, 0.1), transparent 36%),
    radial-gradient(circle at 92% 0%, rgba(142, 202, 230, 0.18), transparent 32%),
    var(--el-paper) !important;
}

body.el-lab .a71-root-bare { padding-top: 0; }
body.el-lab .a71-main { min-height: 100vh; padding-bottom: 3.2rem; }

.el-sash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 1.4rem));
  margin: 0.85rem auto 0.4rem;
  padding: 0.4rem 0.7rem;
  background: var(--el-ink);
  color: #f4f1ea;
}

.el-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.el-brand b {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  background: var(--el-purple);
  color: #fff;
  font-family: var(--el-display);
  font-size: 0.95rem;
  font-weight: 700;
}

.el-count {
  margin: 0;
  font-size: 0.78rem;
  color: var(--el-ice);
}

.el-sash nav {
  display: flex;
  gap: 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.el-sash nav a:hover { color: var(--el-ice); }

.el-bench {
  width: min(1180px, calc(100% - 1.4rem));
  margin: 1.2rem auto 2rem;
}

.el-lede {
  margin: 0 0 1rem;
  max-width: 52ch;
  color: var(--el-mute);
}

.el-orbits {
  margin-bottom: 1.1rem;
  padding: 0.85rem 0.9rem 0.95rem;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(42, 46, 50, 0.1);
}

.el-orbits h2 {
  margin: 0;
  font-family: var(--el-display);
  font-size: 1.45rem;
  font-weight: 700;
  font-style: italic;
}

.el-orbits > p {
  margin: 0.15rem 0 0.7rem;
  font-size: 0.85rem;
  color: var(--el-mute);
}

.el-shells {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.el-shell {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.25rem 0.85rem 0.25rem 2.15rem;
  position: relative;
  border: 1.5px solid var(--el-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.el-shell::before {
  content: attr(data-n);
  position: absolute;
  left: 0.35rem;
  width: 1.45rem;
  height: 1.45rem;
  border: 2px solid var(--el-purple);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 800;
}

.el-shell.is-on {
  background: var(--el-purple);
  color: #fff;
  border-color: var(--el-purple);
}

.el-shell.is-on::before { border-color: var(--el-ice); color: var(--el-ice); }

.el-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.el-key {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--el-mute);
}

.el-key i {
  width: 0.7rem;
  height: 0.7rem;
}

.el-key.is-veg i { background: var(--el-veg); }
.el-key.is-flw i { background: var(--el-flw); }
.el-key.is-for i { background: var(--el-for); }
.el-key.is-fru i { background: var(--el-fru); }
.el-key.is-hrb i { background: var(--el-hrb); }
.el-key.is-spc i { background: var(--el-spc); }

.el-table {
  display: grid;
  grid-template-columns: repeat(var(--el-cols, 6), minmax(10rem, 1fr));
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

.el-group header {
  padding: 0.45rem 0.35rem 0.55rem;
  border-top: 4px solid currentColor;
}

.el-group.is-veg { color: var(--el-veg); }
.el-group.is-flw { color: var(--el-flw); }
.el-group.is-for { color: var(--el-for); }
.el-group.is-fru { color: var(--el-fru); }
.el-group.is-hrb { color: var(--el-hrb); }
.el-group.is-spc { color: var(--el-spc); }

.el-group header span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.el-group h2 {
  margin: 0.1rem 0;
  font-family: var(--el-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--el-ink);
}

.el-group h2 a:hover { text-decoration: underline; }

.el-group header p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--el-mute);
}

.el-cells {
  display: grid;
  gap: 0.35rem;
}

.el-cell {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-height: 8.6rem;
  padding: 0.4rem 0.45rem 0.45rem;
  background: #fff;
  color: var(--el-ink);
  box-shadow: inset 0 0 0 1px rgba(42, 46, 50, 0.18);
  overflow: hidden;
  animation: el-in 0.45s var(--el-ease) both;
}

.el-cell img {
  position: absolute;
  right: -10%;
  bottom: -10%;
  width: 58%;
  height: 58%;
  object-fit: cover;
  opacity: 0.22;
  pointer-events: none;
}

.el-cell small {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.el-cell b {
  font-family: var(--el-display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  position: relative;
}

.el-cell strong {
  position: relative;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
}

.el-cell em {
  position: relative;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
}

.el-cell:hover {
  background: var(--el-ink);
  color: #f4f1ea;
}

.el-cell:hover img { opacity: 0.35; }

.el-cell-more {
  background: transparent;
  box-shadow: inset 0 0 0 2px currentColor;
  color: inherit;
}

.el-cell-more:hover { background: currentColor; color: #fff; }

@media (max-width: 900px) {
  .el-table { grid-template-columns: repeat(3, minmax(9.5rem, 1fr)); }
  .el-sash { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .el-table { grid-template-columns: repeat(2, minmax(8.5rem, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .el-cell { animation: none; }
}

@keyframes el-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
