/* Words the reader chooses to see (scripts/reveal-text.js). A slur in a
   quote, a spoiler: the words sit in the sentence covered by a bar of
   ink, and a click (or Enter) uncovers them. The bar is the word's own
   width, so the sentence keeps its shape and the reader can tell how
   much is hidden. data-warning names why it's covered - 'content' (a
   slur, something hurtful) or 'spoiler' - and the button's label says
   so to a screen reader before anything is read out. Both look the
   same: the label carries the difference (Derek, 2026-11-15).

   Covered = the button. Uncovered = the script swaps the button for the
   plain words, so nothing is left to click. With no script the words
   stay covered: the reader asked for nothing, so nothing shows.
   Leaning on JS here is a fair call - a visitor without it is rare
   enough not to design around (Derek, 2026-11-15). If that ever
   changes, the no-script version is a visually hidden checkbox inside
   a <label> wrapping the words, uncovered by `:has(:checked)`. */

reveal-text {
	/* It lives inside a sentence, so it stays in the line: something
	   upstream makes unknown elements block, which split the paragraph
	   around it (Derek, 2026-11-15). The button sits in the line as one
	   piece (browsers keep buttons inline-block), so a cover moves to the
	   next line whole rather than breaking mid-phrase - keep covers short. */
	display: inline;

	/* A redaction bar, nothing more: square at every corner whatever the
	   character's --corners say, no shadow, no transition - a plain block
	   of the page's ink, like a word blacked out on paper. The one hint
	   that it opens is the hand cursor and the ink going a step lighter
	   on hover (Derek, 2026-11-15: "shouldn't be like an exciting pill"). */
	button {
		min-width: 0;
		min-height: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		transition: none;
		background: var(--ink-primary);
		color: transparent;
		font: inherit;
		/* After `font`, which resets it: the bar hugs the letters (about
		   the height of the type) instead of the paragraph's whole line
		   height, which read heavy. */
		line-height: 1;
		cursor: pointer;
		user-select: none;

		&:hover {
			background: var(--ink-secondary);
		}

		&:focus-visible {
			outline: 2px solid var(--accent);
			outline-offset: 2px;
		}
	}
}
