{
  "format": "css.observer/playground@1",
  "id": "00000000-0000-4000-9000-000000000012",
  "url": "https://css.observer/s/faq-accordion",
  "title": "Exclusive FAQ accordion",
  "description": "Native <details> elements that close each other and animate their height, with no JavaScript.",
  "category": "navigation",
  "tags": [
    "details",
    "interpolate-size",
    "accordion"
  ],
  "visibility": "public",
  "status": "published",
  "revision": 1,
  "author": "observer",
  "forked_from": null,
  "created_at": "2026-12-02T06:24:56.169Z",
  "updated_at": "2026-12-02T06:24:56.169Z",
  "published_at": "2026-12-02T06:24:56.169Z",
  "source": {
    "html": "<section class=\"faq\">\n  <h2 class=\"faq__title\">Frequently asked questions</h2>\n  <details name=\"faq\" open>\n    <summary>Can I change plans later?</summary>\n    <p>Yes. Upgrades apply immediately and are prorated. Downgrades take effect at the end of your billing period.</p>\n  </details>\n  <details name=\"faq\">\n    <summary>Do you offer refunds?</summary>\n    <p>If you're not happy in the first 14 days, email us and we'll refund the full amount, no questions asked.</p>\n  </details>\n  <details name=\"faq\">\n    <summary>Is my data encrypted?</summary>\n    <p>Everything is encrypted in transit with TLS 1.3 and at rest with AES-256. Backups are encrypted with separate keys.</p>\n  </details>\n  <details name=\"faq\">\n    <summary>Can I export my data?</summary>\n    <p>Any time, from Settings → Export. You'll get a ZIP of JSON and CSV files within a few minutes.</p>\n  </details>\n</section>",
    "css": ":root {\n  interpolate-size: allow-keywords;\n}\n\nbody {\n  margin: 0;\n  min-height: 100vh;\n  display: grid;\n  place-items: center;\n  background: #f6f5f1;\n  color: #18191d;\n  font: 15px/1.55 system-ui, sans-serif;\n}\n\n.faq {\n  width: min(520px, 100% - 32px);\n}\n\n.faq__title {\n  margin: 0 0 14px;\n  font-size: 1.3rem;\n  letter-spacing: -0.02em;\n}\n\ndetails {\n  border-bottom: 1px solid #e1ded7;\n}\n\nsummary {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  padding: 16px 2px;\n  font-weight: 600;\n  list-style: none;\n  cursor: pointer;\n}\n\nsummary::-webkit-details-marker {\n  display: none;\n}\n\nsummary::after {\n  content: \"\";\n  flex: none;\n  width: 10px;\n  height: 10px;\n  border-right: 2px solid #8a8c94;\n  border-bottom: 2px solid #8a8c94;\n  transform: translateY(-3px) rotate(45deg);\n  transition: transform 0.25s;\n}\n\ndetails[open] summary::after {\n  transform: translateY(2px) rotate(-135deg);\n}\n\nsummary:focus-visible {\n  outline: 2px solid #18191d;\n  outline-offset: 2px;\n  border-radius: 4px;\n}\n\ndetails p {\n  margin: 0;\n  padding: 0 2px 18px;\n  color: #55585f;\n}\n\ndetails::details-content {\n  block-size: 0;\n  overflow: hidden;\n  transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete;\n}\n\ndetails[open]::details-content {\n  block-size: auto;\n}\n\n@media (prefers-reduced-motion: reduce) {\n  details::details-content,\n  summary::after {\n    transition: none;\n  }\n}",
    "js": ""
  }
}