/* dream.css — classless. black, white, nothing else. */
:root { --b: #000; --w: #fff; color-scheme: dark }
.inv { --b: #fff; --w: #000; color-scheme: light }

*, ::before, ::after { box-sizing: border-box; margin: 0 }
[hidden], [d-text]:empty { display: none !important }
html { background: var(--b); color: var(--w); font: 13px/1.6 ui-monospace, Menlo, Consolas, monospace }
body { min-height: 100vh; padding: 8vmin; display: grid; gap: 4em; align-content: start }
::selection { background: var(--w); color: var(--b) }
:is(input, textarea)::selection { background: var(--b); color: var(--w) }

/* grain */
body::after {
  content: ''; position: fixed; inset: -50%; z-index: 99; pointer-events: none; opacity: .08;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='.9'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: d-grain .4s steps(1) infinite;
}
@keyframes d-grain { 25% { translate: -7% 3% } 50% { translate: 4% -9% } 75% { translate: -3% 6% } }

h1 { font-size: clamp(3rem, 16vw, 10rem); font-weight: 400; line-height: 1; letter-spacing: -.06em }
a { color: inherit; text-decoration: none }
a[aria-current] { background: var(--w); color: var(--b) }
nav { display: flex; gap: 1.5em }
hr { border: 0; border-top: 1px solid }
section { display: grid; gap: 1.5em; justify-items: start }

button, input, textarea, select { font: inherit; color: inherit; background: none; border: 1px solid; border-radius: 0; padding: .5em 1em; outline: 0 }
button { cursor: pointer }
button:active, input:focus, textarea:focus { background: var(--w); color: var(--b) }
::placeholder { color: inherit; opacity: .4 }
input[type=checkbox] { appearance: none; width: 1.2em; height: 1.2em; padding: 0; vertical-align: -.25em; margin-right: .5em; cursor: pointer }
input[type=checkbox]:checked { background: var(--w); box-shadow: inset 0 0 0 3px var(--b) }
input[type=range] { appearance: none; height: 1px; padding: 0; border: 0; background: var(--w); cursor: pointer }
input[type=range]::-webkit-slider-thumb { appearance: none; width: .9em; height: .9em; background: var(--w) }
input[type=range]::-moz-range-thumb { width: .9em; height: .9em; border: 0; border-radius: 0; background: var(--w) }

[d-boil], button:hover, a:hover { filter: url(#d-boil) }

dialog { margin: auto; padding: 2em; background: var(--b); color: var(--w); border: 1px solid }
dialog::backdrop { background: #000c }

[d-views] { display: grid }
[d-views] > * { grid-area: 1 / 1 }
.d-tx { display: inline-grid; grid: 100% / 100%; place-items: start; filter: url(#d-thr) }
.d-tx > * { grid-area: 1 / 1 }
.d-say { position: fixed; bottom: 2em; left: 50%; translate: -50%; padding: .5em 1em; background: var(--w); color: var(--b) }
