/* Alive kit: the visible side of core/alive.js and core/shop.js. Tokens come from the page (--ink, --ecru, --navy,
   --ease-ui, --ease-spring); everything here is behaviour, not brand. */
.skip { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--ecru); border-radius: 6px; font-size: 14px; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--ecru); font-size: 14px; font-weight: 500; padding: 11px 16px; border-radius: 999px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25); max-width: min(92vw, 420px); }
.toast.ok::before { content: '✓'; margin-right: 8px; }

/* Copy affordance: on hover the element says it can be copied, on click it confirms. */
[data-copy] { cursor: copy; }
[data-copy].copied { color: var(--ok, #1d7a4a); }

/* Dialogs: a sheet slides in, a centred one scales in; the backdrop is always navy glass. */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--ecru); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(10, 19, 40, 0.55); backdrop-filter: blur(6px); }
dialog[open] { animation: dlg-in 420ms var(--ease-spring) both; }
dialog[open]::backdrop { animation: fade-in 320ms var(--ease-ui) both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes dlg-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.sheet { position: fixed; top: 0; bottom: 0; height: 100dvh; width: min(440px, 100vw); margin: 0; display: grid; grid-template-rows: auto auto 1fr auto; }
.sheet.right { right: 0; left: auto; } .sheet.left { left: 0; right: auto; }
.sheet.right[open] { animation: sheet-right 460ms var(--ease-spring) both; }
.sheet.left[open] { animation: sheet-left 460ms var(--ease-spring) both; }
@keyframes sheet-right { from { transform: translateX(40px); opacity: 0; } }
@keyframes sheet-left { from { transform: translateX(-40px); opacity: 0; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px 16px; }
.sheet-head h2 { font-size: 18px; font-weight: 500; }
.sheet-body { padding: 8px 24px 24px; overflow: auto; }
.sheet-foot { padding: 16px 24px 24px; border-top: 1px solid rgba(10, 19, 40, 0.1); display: grid; gap: 12px; }
.x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; transition: background 160ms var(--ease-ui); }
.x:hover { background: rgba(10, 19, 40, 0.08); }
.btn[aria-disabled="true"] { opacity: 0.6; pointer-events: none; }
.btn.wide { width: 100%; justify-content: center; }

/* Forms with a real state */
form.pending [type=submit] span { visibility: hidden; }
form.pending [type=submit]::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
form.invalid input:invalid { outline: 2px solid #b4322e; outline-offset: 2px; }
form.done .field { display: none; }
form.done .news-msg { font-weight: 500; }

/* Custom cursor on pointer:fine screens only; the real cursor stays, this follows it. */
.cursor { position: fixed; left: 0; top: 0; z-index: 250; pointer-events: none; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: var(--ecru); color: var(--ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; transform: scale(0); transition: transform 240ms var(--ease-spring); mix-blend-mode: normal; }
.cursor.on { transform: scale(1); }
@media (pointer: coarse) { .cursor { display: none; } }
@media (prefers-reduced-motion: reduce) { dialog[open], dialog[open]::backdrop, .sheet[open] { animation: none; } }

/* The UA hides a closed dialog with lower specificity than a class: say it again, above every layout class. */
dialog:not([open]) { display: none; }
