:root {
  /* Brand */
  --color-navy: #0f172a;
  --color-blue: #2563eb;
  --color-green: #0f766e;
  --color-red: #dc2626;
  --color-warning: #d97706;

  /* Neutrals */
  --color-bg: #f4f7fb;
  --color-surface: #ffffff;
  --color-surface-soft: #f8fbff;
  --color-border: #dce3ec;
  --color-text: #1e293b;
  --color-text-light: #ffffff;
  --color-muted: #48566a;
  --color-muted-light: #94a3b8;

  /* Typography */
  --font-ui: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Font sizes */
  --text-xs: 0.85rem;
  --text-sm: 0.98rem;
  --text-base: 1.1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;

  /* Line heights */
  --leading-tight: 1.15;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Radius */
  --radius-sm: 0.625rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.5rem;
  --radius-full: 999px;

  /* Shadows */
  --shadow-soft: 0 2px 10px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-floating: 0 18px 42px rgba(15, 23, 42, 0.18);

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
  --bottom-nav-height: 72px;
  --container-max: 1200px;

  /* Motion */
  --transition-fast: 150ms ease;
  --transition-base: 220ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

h1,
.h1 {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2,
.h2 {
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 6px 0;
}

h3,
.h3 {
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  font-weight: 650;
  letter-spacing: -0.015em;
}

h4,
.h4 {
  font-size: var(--text-lg);
  line-height: var(--leading-tight);
  font-weight: 650;
}

p {
  color: var(--color-muted);
}

small,
.text-small {
  font-size: var(--text-sm);
}

.text-xs {
  font-size: var(--text-xs);
}

.text-muted {
  color: var(--color-muted);
}

.text-strong {
  color: var(--color-text);
  font-weight: 650;
}

.text-mono {
  font-family: var(--font-mono);
}

.label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

::selection {
  color: #ffffff;
  background: var(--color-blue);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}