/* ── 1. Box sizing ─────────────────────────────────────────── */
*,
*::before,
*::after {
    border-width: 0;
    border-style: solid;
    box-sizing: border-box;
    border-color: #e5e7eb;
}

/* ── 2. Root defaults ──────────────────────────────────────── */
html {
    height: 100%;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    font-family: var(--font-sans, ui-sans-serif, system-ui, -apple-system,
            BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
            Arial, sans-serif);
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
}

/* ── 3. Body ───────────────────────────────────────────────── */
body {
    margin: 0;
    height: 100%;
    line-height: inherit;
}

/* ── 4. Headings ───────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
}

/* ── 5. Paragraphs ─────────────────────────────────────────── */
p {
    margin: 0;
}

/* ── 6. Links ──────────────────────────────────────────────── */
a {
    color: inherit;
    text-decoration: inherit;
}

/* ── 7. Lists ──────────────────────────────────────────────── */
ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── 8. Images & media ─────────────────────────────────────── */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
    display: block;
    vertical-align: middle;
}

img,
video {
    max-width: 100%;
    height: auto;
}

/* ── 9. Forms ──────────────────────────────────────────────── */
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    background-color: transparent;
    background-image: none;
    cursor: pointer;
}

button:disabled,
[type="button"]:disabled,
[type="reset"]:disabled,
[type="submit"]:disabled {
    cursor: default;
}

fieldset {
    margin: 0;
    padding: 0;
}

:-moz-focusring {
    outline: auto;
}

:-moz-ui-invalid {
    box-shadow: none;
}

input::placeholder,
textarea::placeholder {
    opacity: 1;
    color: #9ca3af;
}

textarea {
    resize: vertical;
}

input:where([type="text"]),
input:where([type="email"]),
input:where([type="url"]),
input:where([type="password"]),
input:where([type="number"]),
input:where([type="date"]),
input:where([type="datetime-local"]),
input:where([type="month"]),
input:where([type="search"]),
input:where([type="tel"]),
input:where([type="time"]),
input:where([type="week"]),
select,
textarea {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0;
    padding: 0.25rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5rem;
}

input:where([type="checkbox"]),
input:where([type="radio"]) {
    padding: 0;
    display: inline-block;
    vertical-align: middle;
    background-origin: border-box;
    user-select: none;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    color: #2563eb;
    background-color: #fff;
    border: 1px solid #6b7280;
    border-radius: 0.25rem;
}

input:where([type="radio"]) {
    border-radius: 100%;
}

input:where([type="checkbox"]):checked,
input:where([type="radio"]):checked {
    background-color: currentColor;
    border-color: currentColor;
}

input:where([type="range"]) {
    cursor: pointer;
    width: 100%;
}

/* ── 10. Tables ────────────────────────────────────────────── */
table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
}

/* ── 11. Code & pre ────────────────────────────────────────── */
code,
kbd,
samp,
pre {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo,
            Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: normal;
    font-variation-settings: normal;
    font-size: 1em;
}

pre {
    margin: 0;
    font-size: 0.875em;
    overflow: auto;
}

/* ── 12. Blockquote & figure ───────────────────────────────── */
blockquote,
figure {
    margin: 0;
}

/* ── 13. HR ────────────────────────────────────────────────── */
hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
    margin: 0;
}

/* ── 14. Abbreviation ──────────────────────────────────────── */
abbr:where([title]) {
    text-decoration: underline dotted;
}

/* ── 15. Strong & bold ─────────────────────────────────────── */
b,
strong {
    font-weight: bolder;
}

/* ── 16. Small, sub, sup ───────────────────────────────────── */
small {
    font-size: 80%;
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

/* ── 17. Progress ──────────────────────────────────────────── */
progress {
    vertical-align: baseline;
}

/* ── 18. Summary ───────────────────────────────────────────── */
summary {
    display: list-item;
    cursor: pointer;
}

/* ── 19. Hidden ────────────────────────────────────────────── */
[hidden] {
    display: none !important;
}

/* ── 20. Focus outline ─────────────────────────────────────── */
:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ── 21. Selection ─────────────────────────────────────────── */
::selection {
    background-color: #bfdbfe;
    color: #1e3a8a;
}

/* ── 22. Scrollbar (webkit) ────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

/* ── 23. Spinner / animation (used by animate-spin etc.) ───── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }

    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}