* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  /* Avoid scroll bounce on iOS when whole-screen layouts are used. */
  overscroll-behavior-y: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
  opacity: 0.4;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 24%, transparent);
  outline-offset: 2px;
}

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

svg {
  flex: 0 0 auto;
  color: currentColor;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0;
}

.hidden {
  display: none !important;
}

/* ---------- Typography (matches patient_app FText) ---------- */
.t-display {
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 40px;
  font-weight: 400;
  letter-spacing: -0.95px;
  color: var(--text-primary);
}

.t-title-1 {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 34px;
  font-weight: 400;
  letter-spacing: -0.65px;
  color: var(--text-primary);
}

.t-title-2 {
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: -0.36px;
}

.t-title-3 {
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: -0.19px;
}

.t-body {
  font-size: 16px;
  line-height: 23px;
  font-weight: 400;
  letter-spacing: -0.16px;
}

.t-callout {
  font-size: 15px;
  line-height: 21px;
  font-weight: 400;
  letter-spacing: -0.12px;
}

.t-subheadline {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: -0.07px;
}

.t-footnote {
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  letter-spacing: -0.026px;
}

.t-caption {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

.caption-up {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 1.26px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.brand-mark {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
