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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background: var(--color-warm-sand);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-block-size: 100dvh;
  font-size: var(--size-body);
  font-weight: var(--weight-regular);
  font-feature-settings: "ss01", "cv11";
}

@media (min-width: 768px) {
  body { font-size: var(--size-body-lg); }
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  text-wrap: balance;
  color: var(--color-ink);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--size-display); font-weight: var(--weight-medium); line-height: var(--leading-tight); }
h2 { font-size: var(--size-headline); }
h3 { font-size: var(--size-title-lg); }
h4 { font-size: var(--size-title); }

p { text-wrap: pretty; max-inline-size: 75ch; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--duration-fast) var(--ease-out-quart);
}
a:hover { color: var(--color-apothecary-green-deep); }

img, svg, video { display: block; max-inline-size: 100%; block-size: auto; }
svg { fill: currentColor; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }

ul, ol { list-style: none; }

::selection {
  background: var(--color-apothecary-green-tint);
  color: var(--color-apothecary-green-deep);
}

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-apothecary-green);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-4);
  inset-block-start: calc(-1 * var(--space-20));
  background: var(--color-apothecary-green);
  color: var(--color-warm-sand);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  z-index: 200;
  transition: inset-block-start var(--duration-base) var(--ease-out-quart);
}
.skip-link:focus-visible { inset-block-start: var(--space-4); }

.img-placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0 14px,
      oklch(86% 0.008 80 / 0.35) 14px 15px
    ),
    var(--color-warm-sand-deep);
  border: 1px solid var(--color-stone);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--color-ink-muted);
  font-size: var(--size-caption);
  letter-spacing: var(--tracking-label);
  aspect-ratio: var(--ph-ratio, 1);
  position: relative;
  overflow: hidden;
}
.img-placeholder::after {
  content: attr(data-label);
  opacity: 0.55;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted { color: var(--color-ink-muted); }
.soft { color: var(--color-ink-soft); }
.mono { font-family: var(--font-mono); font-feature-settings: "ss02"; }
