/* Base layer: reset, typography, page scaffold. Mobile-first; every
   color and radius comes from the active theme's tokens. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

/* Editorial voice: greetings and page titles use the platform serif
   (New York on iOS). This is Anna's typographic signature. */
h1,
h2,
.serif {
  font-family: ui-serif, "New York", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: 1.6rem;
}

p {
  margin: 0 0 0.9em;
}

a {
  color: var(--color-primary-strong);
  text-underline-offset: 2px;
}

button {
  font: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 1.25rem) 1.1rem 0;
  /* Room for the fixed tab bar plus the home indicator. */
  padding-bottom: calc(env(safe-area-inset-bottom) + 5.5rem);
}

.muted {
  color: var(--color-text-muted);
}

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

:focus-visible {
  outline: 2px solid var(--color-primary-strong);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
