.code-tabs { margin: 1em 0; } .code-tabs > input { position: absolute; opacity: 0; pointer-events: none; } .code-tabs > label { display: inline-block; padding: 4px 14px; margin-right: 4px; border: 1px solid #f545f5; border-bottom: none; border-radius: 6px 6px 0 0; background: #120f12; color: #bcb4bc; cursor: pointer; user-select: none; } .code-tabs > label:hover { color: #fcfcfc; } .code-tabs > input:checked + label { background: #f545f5; color: #120f12; font-weight: bold; } .code-tabs > input:focus-visible + label { outline: 2px solid #b421f8; outline-offset: 2px; } .code-tabs > .code-tab-panel { display: none; } .code-tabs > .code-tab-panel > pre { margin-top: 0; border-top-left-radius: 0; } .code-tabs > input:nth-of-type(1):checked ~ .code-tab-panel:nth-of-type(1), .code-tabs > input:nth-of-type(2):checked ~ .code-tab-panel:nth-of-type(2), .code-tabs > input:nth-of-type(3):checked ~ .code-tab-panel:nth-of-type(3), .code-tabs > input:nth-of-type(4):checked ~ .code-tab-panel:nth-of-type(4), .code-tabs > input:nth-of-type(5):checked ~ .code-tab-panel:nth-of-type(5), .code-tabs > input:nth-of-type(6):checked ~ .code-tab-panel:nth-of-type(6) { display: block; }