/*
 * The icosahedron galleries — the 59, and the seven rule sets.
 *
 * Shared because the card is the same object in both: a thumbnail, a Du Val
 * symbol, and the cells the figure is made of.
 */

.ic-filter { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 16px 0 4px; }
.ic-filter button {
  padding: 4px 11px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel-2); color: var(--dim);
  font: inherit; font-size: 12.5px; cursor: pointer;
}
.ic-filter button:hover { border-color: var(--accent); color: var(--accent); }
.ic-filter button.on { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.ic-sep { color: var(--dim); font-size: 12px; margin-left: 8px; }
#icCount { color: var(--dim); font-size: 12.5px; margin: 6px 0 0; }

.ic-grid {
  display: grid; gap: 12px; margin-top: 16px;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}
.ic-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); overflow: hidden;
  text-decoration: none; color: inherit;
}
.ic-card:hover { border-color: var(--accent); }
.ic-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--bg); }

/*
 * A card carries both pictures of its figure — the solid, and the stellation
 * diagram it was chosen on — side by side, which is the default: the diagram
 * is half of what these pages are about. The `show` buttons give either one
 * the whole card when you want it bigger.
 *
 * The diagram sits on white whatever the theme, because it is a plate: black
 * lines on paper.
 */
.ic-pics { display: flex; }
.ic-pics img { min-width: 0; flex: 1; }
.pics-solid   .pic-diagram, .pics-solid   .pic-diagram-only { display: none; }
.pics-diagram .pic-solid { display: none; }
.ic-card .pic-diagram { background: #fff; object-fit: contain; }
/* two pictures need a wider card than one, or neither can be read */
.ic-grid.pics-both { grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); }
.pics-both .ic-pics img { aspect-ratio: 1; }
.pics-both .pic-solid { border-right: 1px solid var(--line); }
.ic-card .body { padding: 8px 10px 10px; }
.ic-head { display: flex; align-items: baseline; gap: 6px; }
.ic-n { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.ic-sym { font-size: 14px; font-weight: 600; }
.ic-sym.chiral { font-style: italic; }
.ic-name { margin: 3px 0 0; font-size: 11.5px; color: var(--dim); line-height: 1.4; }
.ic-stat { margin: 4px 0 0; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.ic-shells { margin-top: 6px; display: flex; gap: 3px; flex-wrap: wrap; }
.ic-shells i {
  font-style: normal; font-size: 10px; color: var(--dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 6px;
}
/* a figure this list admits but the canonical 59 does not */
.ic-card.outside { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ic-card.outside .ic-badge {
  display: inline-block; font-size: 10px; padding: 0 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.ic-badge { display: none; }

.ic-shell-key {
  display: grid; gap: 2px 14px; margin: 10px 0 0;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.ic-shell-row { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.ic-shell-row b { min-width: 1.6em; }
.ic-shell-row .n { color: var(--dim); font-variant-numeric: tabular-nums; }
.ic-shell-row .in { color: var(--dim); margin-left: auto; font-size: 11.5px; }

.ic-rules { margin: 8px 0 0; padding-left: 22px; }
.ic-rules li { margin: 2px 0; }
.ic-tally { color: var(--dim); font-size: 13px; margin-top: 10px; }
.ic-others { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
.ic-others li { margin: 3px 0; color: var(--dim); }

.ic-sets { display: grid; gap: 12px; margin-top: 18px;
           grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ic-set {
  display: block; padding: 13px 15px 15px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); text-decoration: none; color: inherit;
}
.ic-set:hover { border-color: var(--accent); }
.ic-set b { font-size: 14px; }
.ic-set .count { float: right; color: var(--accent); font-variant-numeric: tabular-nums; }
.ic-set p { margin: 5px 0 0; font-size: 12.5px; color: var(--dim); line-height: 1.45; }
.ic-set ul { margin: 8px 0 0; padding-left: 17px; font-size: 11.5px; color: var(--dim); }
