<style>
details {
background-color: black;
color: lightgreen;
}
summary {
cursor: pointer;
}
summary:hover {
color:white;
}
details[open]>summary {
/* text should turn pink */
color: pink;
}
</style>
<details>
<summary>Item 1</summary>
<p>
Details go here
</p>
</details>
<details>
<summary>Item 2</summary>
<p>
Details go here
</p>
</details>