Visit-stage FAQ in HTML, CSS and vanilla JS
A copy-paste Visit-stage FAQ in plain HTML and CSS, with vanilla JavaScript: no framework, no build step, MIT-licensed.
Live preview
Source (copy-ready)
<section class="dcl-faq-section-stages-root" aria-label="Visit-stage FAQ" data-dcl-scheme="light">
<h2>Studio visit questions</h2><p class="dcl-faq-section-stages-muted">Practical answers for visitors to the community archive.</p><ol class="dcl-faq-section-stages-stack dcl-faq-section-stages-stages" role="list"><li><section class="dcl-faq-section-stages-stack" aria-label="1. Before visiting"><h3>1. Before visiting</h3><div class="dcl-faq-section-stages-stack"><details class="dcl-faq-section-stages-disclosure"><summary>Do I need to book?</summary><p>Book a slot if you need time on the scanner.</p></details>
<details class="dcl-faq-section-stages-disclosure"><summary>What should I bring?</summary><p>Bring the papers you want to digitise and a storage drive.</p></details></div></section></li>
<li><section class="dcl-faq-section-stages-stack" aria-label="2. Working in the studio"><h3>2. Working in the studio</h3><div class="dcl-faq-section-stages-stack"><details class="dcl-faq-section-stages-disclosure"><summary>Can I bring a guest?</summary><p>One guest can share your booked table.</p></details>
<details class="dcl-faq-section-stages-disclosure"><summary>Is there quiet space?</summary><p>Ask at the desk for the small reading room.</p></details></div></section></li>
<li><section class="dcl-faq-section-stages-stack" aria-label="3. After the visit"><h3>3. After the visit</h3><div class="dcl-faq-section-stages-stack"><details class="dcl-faq-section-stages-disclosure"><summary>Are files kept?</summary><p>You take the only copy unless you request a backup.</p></details>
<details class="dcl-faq-section-stages-disclosure"><summary>Can I return a borrowed drive?</summary><p>Return it at the front desk on your next visit.</p></details></div></section></li></ol>
<script>
(() => {
const root = document.currentScript.closest(".dcl-faq-section-stages-root");
const preference = matchMedia("(prefers-color-scheme: dark)");
const apply = () => {
root.dataset.dclScheme = document.documentElement.dataset.theme || (preference.matches ? "dark" : "light");
};
preference.addEventListener("change", apply);
apply();
})();
</script>
</section>
<style>
.dcl-faq-section-stages-root { color: #11292f; background-color: #ffffff; color-scheme: light; }
.dcl-faq-section-stages-root .dcl-faq-section-stages-panel, .dcl-faq-section-stages-root .dcl-faq-section-stages-badge,
.dcl-faq-section-stages-root button, .dcl-faq-section-stages-root input, .dcl-faq-section-stages-root select, .dcl-faq-section-stages-root summary {
color: #11292f; background-color: #e4edef; border-color: #697f84;
}
.dcl-faq-section-stages-root .dcl-faq-section-stages-muted { color: #405a60; }
.dcl-faq-section-stages-root button:hover, .dcl-faq-section-stages-root button[aria-pressed="true"], .dcl-faq-section-stages-root summary:hover {
color: #ffffff; background-color: #00535a;
}
.dcl-faq-section-stages-root a { color: #005c62; }
.dcl-faq-section-stages-root :focus-visible { outline: 3px solid #005c62; outline-offset: 3px; }
.dcl-faq-section-stages-root { --edge: #697f84; --accent: #00535a; }
.dcl-faq-section-stages-root[data-dcl-scheme="dark"] { color: #eff8f9; background-color: #142f36; color-scheme: dark; }
.dcl-faq-section-stages-root[data-dcl-scheme="dark"] .dcl-faq-section-stages-panel, .dcl-faq-section-stages-root[data-dcl-scheme="dark"] .dcl-faq-section-stages-badge,
.dcl-faq-section-stages-root[data-dcl-scheme="dark"] button, .dcl-faq-section-stages-root[data-dcl-scheme="dark"] input, .dcl-faq-section-stages-root[data-dcl-scheme="dark"] select, .dcl-faq-section-stages-root[data-dcl-scheme="dark"] summary {
color: #eff8f9; background-color: #1c3c44; border-color: #839fa5;
}
.dcl-faq-section-stages-root[data-dcl-scheme="dark"] .dcl-faq-section-stages-muted { color: #b0c9ce; }
.dcl-faq-section-stages-root[data-dcl-scheme="dark"] button:hover, .dcl-faq-section-stages-root[data-dcl-scheme="dark"] button[aria-pressed="true"], .dcl-faq-section-stages-root[data-dcl-scheme="dark"] summary:hover {
color: #11292f; background-color: #8fe1da;
}
.dcl-faq-section-stages-root[data-dcl-scheme="dark"] a { color: #8fe1da; }
.dcl-faq-section-stages-root[data-dcl-scheme="dark"] :focus-visible { outline: 3px solid #8fe1da; outline-offset: 3px; }
.dcl-faq-section-stages-root[data-dcl-scheme="dark"] { --edge: #839fa5; --accent: #8fe1da; }
.dcl-faq-section-stages-root { display: grid; gap: 1rem; box-sizing: border-box; max-inline-size: 60rem; margin-inline: auto; padding: clamp(0.875rem, 3vw, 2rem);
border: 1px solid var(--edge); border-radius: 0.75rem; font: 1rem/1.55 system-ui, sans-serif; overflow-wrap: anywhere; }
.dcl-faq-section-stages-root * { box-sizing: border-box; min-inline-size: 0; }
.dcl-faq-section-stages-root h2, .dcl-faq-section-stages-root h3, .dcl-faq-section-stages-root p, .dcl-faq-section-stages-root ul, .dcl-faq-section-stages-root ol, .dcl-faq-section-stages-root dl, .dcl-faq-section-stages-root dd, .dcl-faq-section-stages-root figure, .dcl-faq-section-stages-root blockquote, .dcl-faq-section-stages-root fieldset { margin: 0; }
.dcl-faq-section-stages-root h2 { font-size: clamp(1.375rem, 3vw, 2rem); line-height: 1.18; }
.dcl-faq-section-stages-root h3 { font-size: 1.125rem; line-height: 1.3; }
.dcl-faq-section-stages-root ul, .dcl-faq-section-stages-root ol { padding: 0; list-style: none; }
.dcl-faq-section-stages-panel > * + *, .dcl-faq-section-stages-disclosure > * + * { margin-block-start: 0.65rem; }
.dcl-faq-section-stages-stack, .dcl-faq-section-stages-grid, .dcl-faq-section-stages-split, .dcl-faq-section-stages-rail { display: grid; gap: 1rem; align-items: start; }
.dcl-faq-section-stages-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.dcl-faq-section-stages-split { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.dcl-faq-section-stages-rail { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.dcl-faq-section-stages-bar { display: flex; flex-wrap: wrap; gap: 0.625rem; align-items: center; }
.dcl-faq-section-stages-spread { justify-content: space-between; }
.dcl-faq-section-stages-panel { padding: 1rem; border: 1px solid var(--edge); border-radius: 0.625rem; }
.dcl-faq-section-stages-badge { display: inline-block; width: fit-content; border: 1px solid var(--edge); border-radius: 1rem;
padding: 0.16rem 0.65rem; font-size: 0.875rem; font-weight: 650; }
.dcl-faq-section-stages-muted { font-size: 0.875rem; }
.dcl-faq-section-stages-root button, .dcl-faq-section-stages-root input, .dcl-faq-section-stages-root select, .dcl-faq-section-stages-root summary {
font: inherit; padding: 0.45rem 0.7rem; border: 1px solid; border-radius: 0.375rem; max-inline-size: 100%; }
.dcl-faq-section-stages-root input[type="checkbox"], .dcl-faq-section-stages-root input[type="radio"] { inline-size: 1.15rem; block-size: 1.15rem; accent-color: var(--accent); }
.dcl-faq-section-stages-root button, .dcl-faq-section-stages-root select, .dcl-faq-section-stages-root summary, .dcl-faq-section-stages-root label { cursor: pointer; }
.dcl-faq-section-stages-root button:disabled { cursor: not-allowed; border-style: dashed; }
.dcl-faq-section-stages-root button:active, .dcl-faq-section-stages-root summary:active { text-decoration: underline; }
.dcl-faq-section-stages-root a { display: inline-block; padding: 0.2rem; text-underline-offset: 0.2em; }
.dcl-faq-section-stages-root a:hover { text-decoration-thickness: 2px; }
.dcl-faq-section-stages-root fieldset { padding: 0.75rem; border: 1px solid var(--edge); border-radius: 0.5rem; }
.dcl-faq-section-stages-root legend { font-weight: 700; padding-inline: 0.35rem; }
.dcl-faq-section-stages-scroll { overflow-x: auto; padding: 0.2rem; }
.dcl-faq-section-stages-root table { border-collapse: collapse; inline-size: 100%; text-align: start; }
.dcl-faq-section-stages-root caption { text-align: start; font-weight: 700; padding-block: 0.375rem; }
.dcl-faq-section-stages-root td, .dcl-faq-section-stages-root th { border-block-end: 1px solid var(--edge); padding: 0.5rem; text-align: start; }
.dcl-faq-section-stages-root svg { display: block; max-inline-size: 100%; block-size: auto; }
.dcl-faq-section-stages-border { border-inline-start: 0.25rem solid var(--accent); padding-inline-start: 0.875rem; }
.dcl-faq-section-stages-center { text-align: center; justify-items: center; }
.dcl-faq-section-stages-center svg { margin-inline: auto; }
.dcl-faq-section-stages-root [hidden] { display: none; }
.dcl-faq-section-stages-stack[hidden], .dcl-faq-section-stages-bar[hidden] { display: none; }
@media (max-width: 34rem) { .dcl-faq-section-stages-rail { grid-template-columns: minmax(0, 1fr); } }
.dcl-faq-section-stages-stages > li { border-inline-start: 0.3rem solid var(--accent); padding-inline-start: 1rem; }
</style>
When to use
Use for questions that arise at predictable stages of a visit or service. Order the groups by the visitor's actual sequence.
Avoid
Do not number unrelated topics as if they must be completed in order.
Accessibility
An ordered topic list preserves the visit sequence. Each question is a native disclosure operated with Enter or Space. Theme token text pairs reach at least 6.2:1 in light and 6.8:1 in dark.
Was this useful? Send feedback.