/* ==========================================================
   Base Styles — Typography, Body, Scrollbar
   ========================================================== */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: var(--font-md);
  line-height: 1.5;
  color: var(--tg-theme-text-color);
  background-color: var(--tg-theme-bg-color);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- App container --- */

#app {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom));
}

/* --- Typography --- */

h1 {
  font-size: var(--font-2xl);
  font-weight: var(--weight-bold);
  line-height: 1.2;
}

h2 {
  font-size: var(--font-xl);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: var(--font-lg);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
}

small {
  font-size: var(--font-sm);
  color: var(--tg-theme-hint-color);
}

/* --- Links --- */

a {
  color: var(--tg-theme-link-color);
}

/* --- Scrollbar (thin, subtle) --- */

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--tg-theme-hint-color);
  border-radius: var(--radius-full);
}

/* --- Utility: visually hidden --- */

.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;
}

/* --- Page section spacing --- */

.page {
  padding: var(--space-lg);
}

.section {
  margin-bottom: var(--space-xl);
}

.section-title {
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
  color: var(--tg-theme-section-header-text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}
