/* 00-reset.css — normalise browser defaults. No design decisions here;
   anything that makes something *look* a certain way belongs in the design
   layer. */

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

/* Every gap is set deliberately by layout rules. */
* {
  margin: 0;
}

html {
  /* Anchors land below the sticky header (height set by 03-layout.css). */
  scroll-padding-top: var(--header-height, 0);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

/* Media: block, never overflowing its container. */
img,
picture,
video,
canvas,
svg,
iframe {
  display: block;
  max-width: 100%;
}

/* The block above beats the browser's [hidden]. Ghost's hidden auth-frame
   iframe (alt-audit.js) otherwise adds 150px under the footer. */
:is(img, picture, video, canvas, svg, iframe)[hidden] {
  display: none;
}

img,
video {
  height: auto;
}

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

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

/* Long words and URLs break instead of forcing horizontal scroll. */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* --weight-heading is the single control point; size is set in 02-base.css. */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--weight-heading);
  line-height: var(--leading-tight);
  /* Neutral until the design layer sets it. */
  letter-spacing: var(--tracking-tight);
}

ul,
ol {
  list-style: none;
  padding: 0;
}

/* Lists in post content keep their markers (ghost-content.css). */

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

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

/* Focus must always be visible. Restyle via tokens; never remove. */
:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-offset);
}

/* Visually hidden, still announced by screen readers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The skip link: hidden until focused. */
.sr-only--focusable:focus-visible {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-modal);
  width: auto;
  height: auto;
  padding: var(--space-2) var(--space-4);
  margin: 0;
  overflow: visible;
  clip-path: none;
  background: var(--color-bg);
  color: var(--color-fg);
}
