/* ==========================================================================
   Platinumlist Design System — Base
   Minimal CSS reset + body defaults using semantic tokens.
   ========================================================================== */

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

html {
  font-family: var(--font-family-default);
  color: var(--content-primary);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family-default);
  font-size: var(--font-size-md);
  line-height: var(--font-line-height-md);
  color: var(--content-primary);
  background: var(--bg-default);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--font-weight-bold); }
p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

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

/* ==========================================================================
   Link conventions (design-system wide)
   1. Blue link (default <a>) — colour --link-base → --link-hover on hover.
      Never underlined.
   2. Secondary / "black" link (.pl-link-secondary) — --interaction-secondary-content
      → --interaction-secondary-content-hover on hover. Never underlined.
   3. Muted / "grey" link (.pl-link-muted) — keeps --content-secondary; the
      ONLY hover affordance is an underline in the same colour.
   ========================================================================== */
a {
  color: var(--link-base);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out);
}
a:hover { color: var(--link-hover); }   /* blue link — colour only, no underline */

.pl-link-secondary { color: var(--interaction-secondary-content); text-decoration: none; }
.pl-link-secondary:hover { color: var(--interaction-secondary-content-hover); text-decoration: none; }

.pl-link-muted { color: var(--content-secondary); text-decoration: none; }
.pl-link-muted:hover { color: var(--content-secondary); text-decoration: underline; }

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-xs);
}

/* A11y: browsers match :focus-visible on text-typing controls even on plain
   mouse clicks (UA heuristic — typing benefits from a visible ring). That
   makes the global focus ring fire on every input click, which isn't the
   design intent: text fields convey focus via their wrapper's border-color
   change (.pl-field, .pl-search, .pl-header-input use :focus-within for
   that). Suppress the ring on the inner control so the wrapper alone owns
   the focus state. The border-color shift meets WCAG 2.4.7 as the focus
   indicator. Keyboard navigation through buttons/links is unaffected.
   We also reset the focus-ring border-radius here: text controls have
   overflow:clip, so a rounded radius would round-clip the value/selection
   at the corners. The wrapper owns the visible radius instead. */
:is(input, select, textarea):focus-visible {
  box-shadow: none;
  border-radius: 0;
}

::selection {
  background: var(--accent-promo-light);
  color: var(--content-primary);
}
