/* ============================================================================================
   overlay-overage.css — the modal's stylesheet (2026-09-15)

   WHAT THIS IS
   The styles of src/components/css/Modal.astro, held outside the shared sheet because the shared
   sheet crossed its 40 KB gzipped line (scripts/verify.mjs, rule P2) by 323 bytes with them in it.
   A page that renders a modal links this sheet with `data-overage` (the /go/ landing pages and the
   kit's Overlays page); the verifier reports it apart from the budget. Tokens only.

   HOW TO MERGE IT BACK
   Move these rules into Modal.astro as its <style is:global> block and drop the sheet from the
   routes' stylesheets prop, once the budget allows.
   ============================================================================================ */
.modal { position: fixed; inset: 0; margin: auto; width: min(100% - 32px, 560px); max-height: min(100% - 32px, 90vh); padding: 0; border: 1px solid var(--border); border-radius: var(--r-panel);
  background: var(--bg); color: var(--body); box-shadow: var(--menu-shadow), 0 48px 120px -24px rgba(15, 13, 28, .32); overflow: auto; overscroll-behavior: contain; }
.modal::backdrop { background: rgba(250, 249, 252, .74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.modal[open] { animation: modal-in var(--t-fast) var(--ease) both; }
.modal[open]::backdrop { animation: modal-fade var(--t-fast) var(--ease) both; }
.modal.is-closing { animation: modal-out 160ms var(--ease) both; }
.modal.is-closing::backdrop { animation: modal-fade 160ms var(--ease) reverse both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes modal-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(6px); } }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .modal[open], .modal[open]::backdrop, .modal.is-closing, .modal.is-closing::backdrop { animation: none; } }
.modal-body { position: relative; display: grid; gap: var(--s-4); padding: var(--sp-40); }
.modal-title { font-size: var(--fs-subhead); line-height: var(--lh-tight); padding-right: 48px; }
.modal-lede { color: var(--muted); }
.modal-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: var(--r-circle); background: var(--bg); color: var(--ink); cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 26, 46, .08); transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.modal-close:hover { background: var(--bg-2); border-color: var(--border-strong); }
.modal-close .icon { width: 18px; height: 18px; }
/* without scripts a link to the dialog's id shows it in flow at the end of the page */
@media (scripting: none) { .modal:target { display: block; position: static; width: auto; max-height: none; margin: var(--s-6) 0; } }
@media (max-width: 640px) { .modal-body { padding: var(--sp-24); } .modal-title { padding-right: 40px; } }
