/* ============================================================
   BASE — Reset + Typography + Global
   ============================================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--fs-body);
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Headings ── */
h1 { font-size: var(--fs-h1); font-weight: 600; color: var(--color-navy); line-height: 1.2; }
h2 { font-size: var(--fs-h2); font-weight: 600; color: var(--color-navy); line-height: 1.3; }
h3 { font-size: var(--fs-h3); font-weight: 500; color: var(--color-navy); }
h4 { font-size: var(--fs-h4); font-weight: 500; color: var(--color-navy); }

/* ── App brand title (TAN Kindred) ── */
.brand-title {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ── Body text ── */
p { font-size: var(--fs-body); }

/* ── Labels & captions ── */
.label {
  font-size: var(--fs-label);
  font-weight: 500;
  color: var(--color-navy);
}
.caption {
  font-size: var(--fs-caption);
  font-family: var(--font-secondary);
  color: var(--color-text-caption);
}
.tooltip-text {
  font-size: var(--fs-tooltip);
  font-family: var(--font-secondary);
  color: var(--color-navy);
}

/* ── Section micro-label ── */
.section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-caption);
  margin-bottom: var(--sp-xs);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,48,73,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,48,73,0.28); }

/* ── Focus ring ── */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.3);
}

/* ── Selection ── */
::selection {
  background: rgba(214, 40, 40, 0.15);
  color: var(--color-navy);
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
