/* Shared presentation for the interactive CSS selector lessons. */
.selector-intro, .specificity-intro { max-width: 68ch; color: #24313d; font-size: 1.05rem; line-height: 1.65; }
.selector-intro code, .specificity-intro code, .specificity-table code, .specificity-rule code { border-radius: .3rem; background: #e8eef2; color: #102a43; padding: .12em .35em; }
.family-terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.family-term, .specificity-rule { border: 1px solid #c7d4dc; border-radius: .65rem; background: rgba(255,255,255,.75); padding: 1rem; }
.family-term h2 { margin: 0 0 .5rem; color: #12344d; font-size: 1.05rem; }
.family-term pre { margin: .75rem 0; white-space: pre-wrap; }
.family-term p { margin: 0; }
.selector-lab { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; width: 100%; border-collapse: separate; }
.selector-lab tbody, .selector-lab tr { display: contents; }
.selector-lab td { display: block; min-width: 0; border: 1px solid #b9cbd5; border-radius: .65rem; background: rgba(255,255,255,.82); box-shadow: 0 .2rem .55rem rgba(27,53,71,.12); padding: 1rem; vertical-align: top; }
.selector-lab pre { box-sizing: border-box; margin: .85rem 0 0; overflow: visible; border-radius: .35rem; padding: 1rem; font-size: .95rem; line-height: 1.55; white-space: pre-wrap; }
.selector-lab pre p, .selector-lab pre div { display: inline; margin: 0; }
.selector-lab :is(#comma, #not, #space, #greater, #tilda, #plus, #only_of_type, #only_child, #first_child, #first_of_type, #last_child, #last_of_type, #nth_child2, #nth_last_child2, #nth_last_of_type2, #nth_of_type2) :is(p, div, span) { border-radius: .15rem; }
.specificity-video { display: block; width: min(100%,42rem); aspect-ratio: 16 / 9; height: auto; margin: 1.5rem auto 2rem; border: 0; border-radius: .7rem; box-shadow: 0 .35rem 1rem rgba(27,53,71,.22); }
.specificity-score { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin: 1.5rem 0; }
.specificity-score > div { border-radius: .65rem; padding: 1rem; color: #fff; }
.specificity-score > div:nth-child(1) { background: #7c2d12; } .specificity-score > div:nth-child(2) { background: #075985; } .specificity-score > div:nth-child(3) { background: #3f6212; }
.specificity-score strong { display: block; font-size: 1.35rem; }
.specificity-table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; background: rgba(255,255,255,.85); }
.specificity-table th, .specificity-table td { border: 1px solid #b9cbd5; padding: .8rem; text-align: left; vertical-align: top; }
.specificity-table th { background: #12344d; color: #fff; } .specificity-table tr:nth-child(even) { background: #edf5f7; }
@media (max-width: 680px) { .family-terms, .specificity-score, .selector-lab { grid-template-columns: 1fr; } .selector-lab td { padding: .8rem; } }
