/**
 * AI Study & Task Planner - Base & Typography
 */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  background-color: var(--color-bg-base);
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden; /* Desktop: prevent window scrolling so sidebar stays fixed */
}

@media (max-width: 768px) {
  html, body {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100%;
    -webkit-overflow-scrolling: touch;
  }
}

button, a, input, select, textarea, .today-task-card, .btn, .nav-item-btn, .mobile-nav-btn {
  touch-action: manipulation;
}

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

/* Accessibility Focus */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

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

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

h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1.0rem; }

.font-mono {
  font-family: var(--font-mono);
}

.text-muted {
  color: var(--color-text-muted);
}

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

.text-emerald {
  color: var(--color-accent-emerald);
}

.text-cyan {
  color: var(--color-accent-cyan);
}

.text-purple {
  color: var(--color-accent-purple);
}

.text-amber {
  color: var(--color-accent-amber);
}

.text-rose {
  color: var(--color-accent-rose);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

.badge-emerald {
  background: var(--color-accent-emerald-subtle);
  color: var(--color-accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cyan {
  background: var(--color-accent-cyan-subtle);
  color: var(--color-accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-purple {
  background: var(--color-accent-purple-subtle);
  color: var(--color-accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-amber {
  background: var(--color-accent-amber-subtle);
  color: var(--color-accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-rose {
  background: var(--color-accent-rose-subtle);
  color: var(--color-accent-rose);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-slate {
  background: var(--color-bg-surface-elevated);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-wrap svg {
  width: 1.15em;
  height: 1.15em;
}
