/*
 * Base reset (Phase 5). Replaces the Tailwind preflight now that no template uses Tailwind.
 * Same normalisation the ds components were built on; colours, borders and fonts from tokens.
 */
*, ::before, ::after { box-sizing: border-box; border: 0 solid var(--theme-divider); }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; font-family: var(--font-family-base); }
body { margin: 0; line-height: inherit; background: var(--misc-body-bg); color: var(--theme-text-primary); -webkit-font-smoothing: antialiased; }
hr { height: 0; color: inherit; border-block-start-width: var(--ds-border); }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }
small { font-size: var(--basic-typography-caption-font-size); }
table { text-indent: 0; border-color: inherit; border-collapse: collapse; }
button, input, optgroup, select, textarea { font-family: inherit; font-size: 100%; font-weight: inherit; line-height: 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; }
blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre { margin: 0; }
fieldset { margin: 0; padding: 0; }
legend { padding: 0; }
ol, ul, menu { list-style: none; margin: 0; padding: 0; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { opacity: 1; color: var(--theme-text-disabled); }
button, [role="button"] { cursor: pointer; }
:disabled { cursor: default; }
img, svg, video, canvas, audio, iframe, embed, object { display: block; vertical-align: middle; }
img, video { max-width: 100%; height: auto; }
[hidden] { display: none; }

/* Page headings outside components */
h1 { font-size: var(--basic-typography-h4-font-size); line-height: var(--basic-typography-h4-line-height); font-weight: var(--basic-typography-h4-font-weight); }
h2 { font-size: var(--basic-typography-h5-font-size); line-height: var(--basic-typography-h5-line-height); font-weight: var(--basic-typography-h5-font-weight); }

/* Alpine / htmx helpers */
[x-cloak] { display: none !important; }
.htmx-indicator { opacity: 0; transition: opacity .15s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
