/* ============================================================
   Backlog — Base Reset & Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

/* Ensure [hidden] always wins over display:flex/grid from component CSS */
[hidden] { display: none !important; }
.hidden { display: none !important; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-page);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

/* ── Typography ──────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl);  }
h4 { font-size: var(--text-lg);  }

p { color: var(--text-secondary); }

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--text-primary); }

strong { font-weight: 600; color: var(--text-primary); }

/* ── Utility classes ─────────────────────────────────────────── */

.text-primary   { color: var(--text-primary)   !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted)     !important; }
.text-accent    { color: var(--accent-light)   !important; }

.text-sm  { font-size: var(--text-sm);  }
.text-xs  { font-size: var(--text-xs);  }
.text-lg  { font-size: var(--text-lg);  }
.text-2xl { font-size: var(--text-2xl); }

.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }

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

/* ── Scrollbar ───────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: var(--bg-page); }
::-webkit-scrollbar-thumb  { background: var(--bg-hover); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ── Selection ───────────────────────────────────────────────── */

::selection {
  background: var(--accent-selection);
  color: #fff;
}

/* ── Focus visible ───────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ── Images ──────────────────────────────────────────────────── */

img { max-width: 100%; height: auto; display: block; }
