/**
 * Emailer Design System — base styles and shared primitives used by both
 * the landing (SSR) and the dashboard shell.
 */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--sp-3);
}

p {
  margin: 0 0 var(--sp-3);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-3);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}

/* Accessible focus — never remove, always visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--accent-soft);
}

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

.skip-link {
  position: absolute;
  left: var(--sp-3);
  top: -100px;
  z-index: 100;
  background: var(--surface-1);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus {
  top: var(--sp-3);
}
