/* Base común de las demos: reset, barra superior, aviso, diálogo y accesibilidad. Cada demo define su propia identidad visual. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; overflow-x: clip; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
ul, ol { list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus, currentColor); outline-offset: 3px; }

.demo-bar { position: relative; z-index: 100; display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 1rem; background: #0c0c0c; color: #d8d8d0; font: 500 11px/1.4 'DM Mono', ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; }
.demo-bar a { color: #fff; text-decoration: none; border-bottom: 1px solid #fff6; }
.demo-bar a:hover { border-color: #fff; }

.toast { position: fixed; z-index: 300; left: 50%; bottom: 1.5rem; transform: translate(-50%, 200%); max-width: calc(100% - 2rem); padding: .8rem 1.2rem; background: var(--toast-bg, #111); color: var(--toast-fg, #fff); font-size: .95rem; transition: transform .35s cubic-bezier(.2, .9, .3, 1.2); box-shadow: 0 10px 30px #0004; }
.toast.show { transform: translate(-50%, 0); }

dialog { border: 0; padding: 0; max-width: 100vw; background: transparent; color: inherit; }
dialog::backdrop { background: #000a; backdrop-filter: blur(3px); }
.faq-i { border-top: 1px solid var(--rule, #0003); }
.faq-i:last-child { border-bottom: 1px solid var(--rule, #0003); }
.faq-i summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; font-weight: 600; }
.faq-i summary::-webkit-details-marker { display: none; }
.faq-i summary::after { content: '+'; font-weight: 300; font-size: 1.5em; line-height: 1; transition: transform .3s; }
.faq-i[open] summary::after { transform: rotate(45deg); }
.faq-i p { padding: 0 0 1.2rem; max-width: 60ch; opacity: .75; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001s !important; transition-duration: .001s !important; scroll-behavior: auto !important; } }
