html {
    max-width: 35rem;
}
figure {
    margin: 0;
    margin-top: 1rem;
    margin-bottom: 1rem;
    position: relative;
}
figure img {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
}
figure details {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    border: 1px solid #ccc;
    display: block;
    margin-right: 1rem;
}
figure summary {
    width: calc(100% - 2rem);
    cursor: pointer;
    list-style: none;
    color: black;
}
figure details:has(summary:focus) {
    outline: none;
    color: yellow;
    background-color: black;
    summary {
        color: yellow;
        background-color: black;
        outline: yellow;
    }
}
figure details[open] p, figure details[open] summary {
    border-radius: var(--border-radius);
    border: 1px solid #ccc;
    padding: 0.25rem 0.5rem;
    color: black;
}
figure details[open] p {
    background-color: white;
    margin: 0;
}
figure details[open] summary {
    width: max-content;
    margin-bottom: 0.25rem;
    list-style: none;
    color: black;
    background-color: white;
}
figure details[open] {
    border: none;
    background-color: transparent !important;
    padding: 0;
}
