/* Base reset and document-level rules. */

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: fixed;
  inset: 0;
  touch-action: none; /* the app handles all gestures itself */
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

/* Scrollable surfaces opt back into normal touch handling. */
.scrollable {
  overflow-y: auto;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 650;
  line-height: var(--lh-tight);
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--life-core);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

/* Respect forced-colors mode: let system colors show through. */
@media (forced-colors: active) {
  .btn, .card, .context-surface {
    border: 1px solid CanvasText;
  }
}

/* Visually hidden but available to assistive technology. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(110, 243, 214, 0.3);
}
