/* ==========================================================================
   InSono — Reset
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    /* Dawn theme.liquid: calc(var(--font-body-scale) * 62.5%)
       body_scale 100 → 62.5% → 1rem = 10px (with the browser default of 16px) */
    font-size: calc(var(--font-body-scale) * 62.5%);
    height: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
    min-height: 100%;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* Pictures, icons and videos are part of the page, not things to take: no
   dragging them out, no selecting them, no "save / copy / share" menu on a
   long press (iOS). Swiping through a gallery still works — that moves the
   gallery, not the picture. utilities.js stops dragstart and the context
   menu for browsers that ignore these. */
img,
picture,
video,
svg {
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

ul,
ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

table {
    border-collapse: collapse;
    width: 100%;
}

summary {
    cursor: pointer;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

fieldset {
    border: 0;
}

/* ---- Accessibility ---- */

.visually-hidden {
    position: absolute !important;
    overflow: hidden;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-to-content {
    position: absolute;
    z-index: 9999;
    top: 8px;
    left: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: var(--white);
    font-weight: 700;
    transform: translateY(-200%);
    transition: transform var(--transition-fast);
}

.skip-to-content:focus {
    transform: translateY(0);
}

/* An element carrying the hidden attribute stays hidden, whatever a class
   says about its display. The browser's own rule is a plain attribute
   selector, so any class with a display of its own quietly outranked it —
   that is how the empty error banner showed as a red stripe on the payment
   page while its text was still empty. */
[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--header-accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
