/* Polished material circles; the accepted catalogue layout and tree stay intact. */
.ct-catalog-page {
    --ct-orb-top: #ffffff;
    --ct-orb-middle: #e8d9f5;
    --ct-orb-base: #d9c2ec;
    --ct-orb-rim: #c2a7da;
    --ct-orb-highlight: #ffffffdb;
    --ct-orb-reflection: #ffffff85;
    --ct-orb-shade: #8a5ab538;
    --ct-orb-glow: #b588e54d;
    --ct-orb-track: #b99bce6b;
    --ct-orb-spark: #9364bf;
}
[data-ct-lesson-theme="dark"] .ct-catalog-page {
    --ct-orb-top: #756086;
    --ct-orb-middle: #483655;
    --ct-orb-base: #30233e;
    --ct-orb-rim: #87669e;
    --ct-orb-highlight: #ead4ff70;
    --ct-orb-reflection: #ebd4ff38;
    --ct-orb-shade: #130c2599;
    --ct-orb-glow: #b17de642;
    --ct-orb-track: #a27abd66;
    --ct-orb-spark: #d4aff4;
}
.ct-catalog-materials {
    --ct-material-orb-size: clamp(78px, 8vw, 94px);
    --ct-material-min: max(104px, calc(var(--ct-material-orb-size) + 22px));
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--ct-material-min)), 1fr));
    gap: 28px 12px;
    min-width: 0;
}
/* Supersede the full-width, split-group and filtered fractional flex widths. */
.ct-catalog-groups .ct-catalog-group .ct-catalog-material {
    width: auto;
    padding-inline: 0;
    perspective: 650px;
}
.ct-catalog-material-name { font-size: clamp(12px, 1vw, 14px); text-wrap: balance; }
.ct-catalog-material-description { font-size: clamp(10px, .8vw, 11px); margin-bottom: 9px; }
.ct-catalog-material-status { font-size: 10px; white-space: nowrap; margin-top: auto; }
.ct-catalog-material-orb {
    --ct-orb-lift: 0px;
    isolation: isolate;
    width: var(--ct-material-orb-size);
    height: var(--ct-material-orb-size);
    flex-shrink: 0;
    background: none;
    border: 0;
    box-shadow: none;
    transform: perspective(650px) translateY(var(--ct-orb-lift)) rotateX(var(--ct-orb-tilt-x,0deg)) rotateY(var(--ct-orb-tilt-y,0deg));
    transition: transform .45s cubic-bezier(.2,.75,.25,1);
}
.ct-catalog-material-orb::before { content: ''; position: absolute; z-index: -1; inset: -12px; border-radius: 50%; background: radial-gradient(circle,var(--ct-orb-glow),transparent 69%); opacity: .5; scale: .94; transition: opacity .4s, scale .4s; pointer-events: none; }
.ct-catalog-material-orb::after { content: ''; position: absolute; z-index: -1; width: 72%; height: 11px; bottom: -7px; left: 14%; border-radius: 50%; background: var(--ct-orb-shade); filter: blur(7px); opacity: .6; scale: .9; transition: opacity .4s, scale .4s; pointer-events: none; }
.ct-catalog-material-core { position: relative; z-index: 1; display: grid; place-items: center; width: 100%; height: 100%; border: 1px solid var(--ct-orb-rim); border-radius: 50%; overflow: hidden; background: radial-gradient(ellipse at 30% 17%,var(--ct-orb-top),transparent 60%),linear-gradient(145deg,var(--ct-orb-middle),var(--ct-orb-base)); box-shadow: inset 0 2px 2px var(--ct-orb-highlight),inset 0 -5px 9px var(--ct-orb-shade),0 8px 16px var(--ct-orb-shade); transition: box-shadow .4s, border-color .4s; }
.ct-catalog-material-core::before { content: ''; position: absolute; z-index: 2; inset: 0; border-radius: inherit; background: radial-gradient(ellipse at var(--ct-orb-light-x,30%) var(--ct-orb-light-y,20%),var(--ct-orb-reflection),transparent 57%); pointer-events: none; }
.ct-catalog-material-core::after { content: ''; position: absolute; z-index: 3; inset: 5px; border: 1px solid var(--ct-orb-highlight); border-bottom-color: transparent; border-radius: 50%; opacity: .55; pointer-events: none; }
.ct-catalog-material-orb img { position: relative; z-index: 2; width: 56%; height: 56%; filter: drop-shadow(0 5px 3px var(--ct-orb-shade)); transform: translateY(-1px); transition: transform .5s cubic-bezier(.2,.75,.25,1),filter .4s; }
.ct-catalog-material-sheen { position: absolute; z-index: 4; inset: -25%; background: linear-gradient(110deg,transparent 37%,var(--ct-orb-highlight) 48%,transparent 58%); opacity: 0; transform: translateX(-100%); pointer-events: none; }
.ct-catalog-material-orbit { z-index: 2; inset: -6px; border: 1px solid var(--ct-orb-track); transform: none; pointer-events: none; }
.ct-catalog-material-orbit::before { content: ''; position: absolute; inset: -1px; border-radius: 50%; padding: 1.5px; background: conic-gradient(from 15deg,transparent 5%,var(--ct-orb-spark) 18%,var(--ct-orb-highlight) 27%,transparent 37%,transparent 68%,var(--ct-orb-rim) 82%,transparent 94%); mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); mask-composite: exclude; }
.ct-catalog-material-orbit::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; top: -3px; left: calc(50% - 2px); background: var(--ct-orb-spark); box-shadow: 0 0 0 2px var(--ct-surface),0 0 8px var(--ct-orb-glow); }
.ct-catalog-material-orbit-fine { position: absolute; z-index: 0; inset: -11px; border: 1px solid transparent; border-inline-color: var(--ct-orb-track); border-radius: 50%; transform: rotate(-27deg); opacity: .7; pointer-events: none; }
.ct-catalog-material-open { z-index: 5; width: 26px; height: 26px; bottom: -3px; inset-inline-end: -5px; border: 2px solid var(--ct-surface); background: var(--ct-accent); color: var(--ct-on-accent); box-shadow: 0 3px 8px var(--ct-orb-shade); transition: transform .35s,background .25s,box-shadow .35s; }
.ct-catalog-material-name { transition: color .25s; }
.ct-catalog-material-available .ct-catalog-material-orbit { border-color: var(--ct-orb-track); }
.ct-catalog-material:hover .ct-catalog-material-orb,
.ct-catalog-material:focus-visible .ct-catalog-material-orb { --ct-orb-lift: -7px; transform: perspective(650px) translateY(var(--ct-orb-lift)) rotateX(var(--ct-orb-tilt-x,0deg)) rotateY(var(--ct-orb-tilt-y,0deg)); box-shadow: none; }
.ct-catalog-material:is(:hover,:focus-visible) .ct-catalog-material-orb::before { opacity: 1; scale: 1.18; }
.ct-catalog-material:is(:hover,:focus-visible) .ct-catalog-material-orb::after { opacity: .4; scale: 1.15; }
.ct-catalog-material:is(:hover,:focus-visible) .ct-catalog-material-core { border-color: var(--ct-accent); box-shadow: inset 0 2px 2px var(--ct-orb-highlight),inset 0 -5px 9px var(--ct-orb-shade),0 12px 22px var(--ct-orb-shade); }
.ct-catalog-material:hover .ct-catalog-material-orbit { border-color: var(--ct-orb-track); transform: none; }
.ct-catalog-material:is(:hover,:focus-visible) .ct-catalog-material-orb img { transform: translateY(-4px) scale(1.08) rotate(-4deg); }
.ct-catalog-material:is(:hover,:focus-visible) .ct-catalog-material-open { transform: translate(1px,-1px) scale(1.1); box-shadow: 0 4px 12px var(--ct-orb-shade); }
.ct-catalog-material:focus-visible { outline-offset: 7px; }
.ct-catalog-material:active .ct-catalog-material-orb { scale: .96; }
.ct-catalog-featured-icon { border-color: var(--ct-orb-rim); background: radial-gradient(ellipse at 30% 17%,var(--ct-orb-top),transparent 60%),linear-gradient(145deg,var(--ct-orb-middle),var(--ct-orb-base)); box-shadow: inset 0 2px 2px var(--ct-orb-highlight),inset 0 -5px 9px var(--ct-orb-shade),0 8px 16px var(--ct-orb-shade); }
.ct-catalog-featured-icon::before { content: ''; position: absolute; inset: -7px; border: 1px solid var(--ct-orb-track); border-radius: 50%; pointer-events: none; }
.ct-catalog-featured-icon::after { content: ''; position: absolute; inset: 5px; border: 1px solid var(--ct-orb-highlight); border-bottom-color: transparent; border-radius: 50%; opacity: .55; pointer-events: none; }
.ct-catalog-featured-icon img { filter: drop-shadow(0 5px 3px var(--ct-orb-shade)); transition: transform .4s; }
.ct-catalog-featured:is(:hover,:focus-visible) .ct-catalog-featured-icon img { transform: translateY(-3px) rotate(-4deg); }

@media (max-width: 720px) {
    .ct-catalog-material-orbit { inset: -5px; }.ct-catalog-material-orbit-fine { inset: -9px; }
    .ct-catalog-material-open { width: 23px; height: 23px; inset-inline-end: -3px; }
}
@media (max-width: 370px) {
    .ct-catalog-material-orbit { inset: -4px; }.ct-catalog-material-orbit-fine { inset: -7px; }
    .ct-catalog-material-core::after { inset: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
    .ct-orb-arriving { animation: ct-orb-arrive .7s cubic-bezier(.2,.7,.25,1) var(--ct-orb-delay,0ms) backwards; }
    .ct-orb-arriving .ct-catalog-material-orbit { animation: ct-orb-orbit 3.8s cubic-bezier(.2,.65,.3,1) var(--ct-orb-delay,0ms) 1; }
    .ct-orb-arriving .ct-catalog-material-orb img { animation: ct-orb-float 1.6s ease-in-out var(--ct-orb-delay,0ms) 2; }
    .ct-orb-arriving .ct-catalog-material-sheen { animation: ct-orb-sheen 1.5s ease calc(var(--ct-orb-delay,0ms) + 180ms) 1; }
    @keyframes ct-orb-arrive { from { opacity: .25; translate: 0 17px; } to { opacity: 1; translate: 0 0; } }
    @keyframes ct-orb-orbit { from { rotate: -360deg; } to { rotate: 0deg; } }
    @keyframes ct-orb-float { 0%,100% { transform: translateY(-1px); } 50% { transform: translateY(-5px) rotate(-3deg); } }
    @keyframes ct-orb-sheen { 0% { opacity: 0; transform: translateX(-85%); } 24% { opacity: .52; } 75% { opacity: .26; } 100% { opacity: 0; transform: translateX(85%); } }
    @keyframes ct-orb-sheen-hover { 0% { opacity: 0; transform: translateX(-85%); } 24% { opacity: .52; } 75% { opacity: .26; } 100% { opacity: 0; transform: translateX(85%); } }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .ct-catalog-material:hover .ct-catalog-material-orbit { animation: ct-orb-orbit 7s linear infinite; }
    .ct-catalog-material:hover .ct-catalog-material-sheen { animation: ct-orb-sheen-hover 1.2s ease 1; }
    .ct-catalog-material:hover .ct-catalog-material-orb img { animation: none; }
}
@media (hover: none) {
    .ct-catalog-material:hover .ct-catalog-material-orb { --ct-orb-lift: 0px; }
}
[data-ct-orb-paused] :is(.ct-orb-arriving,.ct-catalog-material-orbit,.ct-catalog-material-orb img,.ct-catalog-material-sheen) { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
    .ct-catalog-material, .ct-catalog-material * { animation: none !important; transition: none !important; }
    .ct-catalog-material-orb, .ct-catalog-material:hover .ct-catalog-material-orb, .ct-catalog-material:focus-visible .ct-catalog-material-orb { transform: none; }
    .ct-catalog-material:active .ct-catalog-material-orb { scale: 1; }
    .ct-catalog-material:is(:hover,:focus-visible) .ct-catalog-material-orb img { transform: translateY(-1px); }
    .ct-catalog-featured:is(:hover,:focus-visible) .ct-catalog-featured-icon img { transform: none; }
}
