/* -------------------------------------------------------------------
 * Base Styles & Typography
 * ------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

.sidebar, .workspace, .top-navbar, .panel, .chat-wrapper, .modal-dialog {
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

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

h1 { font-size: 1.85rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.9rem; }

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

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

a:hover {
  color: var(--primary-accent-hover);
  text-decoration: underline;
}

code, pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

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

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* Accessible Focus States */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

::selection {
  background: var(--primary-accent-subtle);
  color: var(--text-main);
}
