/* ==========================================================================
   cld-base.css – shared base for all Claude Design components
   --------------------------------------------------------------------------
   - Load once per page, after the main site CSS and before any cld-*.css
     component file.
   - Shared design tokens live in the site's :root (main CSS). Do not
     redeclare them here or in component files.
   - Everything is scoped to .cld. The host page sets
     html { font-size: 62.5% }, so 1rem = 10px (rem in media queries is
     still based on 16px).
   - Selectors here are .cld + element (specificity 0,1,1): they beat the
     site's plain element rules, and component rules (.cld .block__element,
     0,2,0) always beat them.
   ========================================================================== */

/* --- Root of every component -------------------------------------------- */

.cld {
  color: var(--color-text);
  font-family: var(--font-family-base);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-regular);
  line-height: normal;
  text-align: start; /* the site's body uses text-align: center */
}

/* --- Neutralise inherited / element-level site styles -------------------- */

.cld :is(h1, h2, h3, h4, h5, h6) {
  margin: 0;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.cld :is(p, figure, blockquote, dl, dd) {
  margin: 0;
}

.cld :is(ul, ol) {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.cld a:is(:hover, :focus) {
  text-decoration: none;
}

.cld :is(img, svg, video, canvas) {
  display: block;
  max-width: 100%;
}

/* --- Utilities ---------------------------------------------------------- */

.cld .visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .cld,
  .cld *,
  .cld *::before,
  .cld *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
