/* Mobile Square — Base element defaults
   Light reset + brand defaults. Consumers link styles.css which reaches this. */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Display font for headings, body font for prose */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  text-wrap: balance;
}
p { text-wrap: pretty; }

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

/* Links */
a { color: var(--text-link); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--text-link-hover); }

/* Form elements inherit type */
button, input, select, textarea { font: inherit; color: inherit; }

/* Selection + focus */
::selection { background: var(--ms-yellow-400); color: var(--ms-ink-900); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Monospace niceties */
code, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; }

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