/** Critical CSS — included on every page.
 *
 * Rules scoped to the `skeleton` cascade layer so Tailwind utilities win.
 * Layer order declared identically here and in src/tailwind.css.
 */
@layer skeleton, theme, base, components, utilities;

@layer skeleton {

/* Reset styles — https://www.joshwcomeau.com/css/custom-css-reset/ */
* {
  box-sizing: border-box;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100svh;
}

html:has(dialog[scroll-lock][open], details[scroll-lock][open]) {
  overflow: hidden;
}

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

input,
textarea,
select {
  font: inherit;
}

p {
  text-wrap: pretty;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p:empty {
  display: none;
}

button:not(:disabled) {
  cursor: pointer;
}

:is(p, h1, h2, h3, h4, h5, h6):first-child,
:empty:first-child + :where(p, h1, h2, h3, h4, h5, h6) {
  margin-block-start: 0;
}

:is(p, h1, h2, h3, h4, h5, h6):last-child,
:where(p, h1, h2, h3, h4, h5, h6) + :has(+ :empty:last-child) {
  margin-block-end: 0;
}

} /* end @layer skeleton */

@layer base {

a {
  transition-property: background-color, color, border-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(.4,0,1,1);
  text-underline-offset: 0.35rem;
}

[rel="noreferrer"]:not(.no-external-icon)::after,
[rel="noopener noreferrer"]:not(.no-external-icon)::after,
[rel="noreferrer noopener"]:not(.no-external-icon)::after {
  content: "↗";
  margin-left: .25rem;
  display: inline-block;
}

} /* end @layer base */
