:root {
  --bg: #eef5fb;
  --ink: #1c2430;
  --muted: #3d4a5c;
  --faint: #5e6b7c;
  --line: rgba(28, 36, 48, 0.12);
  --line-strong: rgba(28, 36, 48, 0.22);
  --copper: #8d4520;
  --copper-soft: rgba(141, 69, 32, 0.12);
  --copper-glow: rgba(227, 148, 85, 0.45);
  --paper: #fffcf7;
  --paper-2: rgba(255, 252, 247, 0.92);
  --sky: #2f7eb8;
  --sky-soft: rgba(47, 126, 184, 0.12);
  --wash-a: rgba(150, 196, 232, 0.75);
  --wash-b: rgba(190, 216, 240, 0.9);
  --wash-c: rgba(141, 69, 32, 0.1);
  --shadow: 0 16px 40px rgba(28, 36, 48, 0.08);
  --shadow-lift: 0 18px 34px rgba(28, 36, 48, 0.14);
  --btn-bg: #1c2430;
  --btn-ink: #fffaf6;
  --sidebar: 312px;
  --card-min: 250px;
  --card-pad: 1rem 1.05rem 0.85rem;
  --row-pad: 0.48rem 0.5rem;
  --gap: 0.85rem;
  --radius: 18px;
  --tile: 36px;
  --tile-card: 42px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Syne", "Outfit", "Avenir Next", sans-serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #101820;
  --ink: #f4f0ea;
  --muted: #c9d4e0;
  --faint: #9aabbd;
  --line: rgba(238, 245, 251, 0.12);
  --line-strong: rgba(238, 245, 251, 0.24);
  --copper: #e39455;
  --copper-soft: rgba(227, 148, 85, 0.16);
  --copper-glow: rgba(227, 148, 85, 0.28);
  --paper: #1a2633;
  --paper-2: rgba(22, 34, 46, 0.94);
  --sky: #8ec4ea;
  --sky-soft: rgba(142, 196, 234, 0.14);
  --wash-a: rgba(47, 126, 184, 0.32);
  --wash-b: rgba(142, 196, 234, 0.1);
  --wash-c: rgba(227, 148, 85, 0.14);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  --shadow-lift: 0 18px 36px rgba(0, 0, 0, 0.42);
  --btn-bg: #f4f0ea;
  --btn-ink: #1c2430;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"],
  html:not([data-theme]) {
    --bg: #101820;
    --ink: #f4f0ea;
    --muted: #c9d4e0;
    --faint: #9aabbd;
    --line: rgba(238, 245, 251, 0.12);
    --line-strong: rgba(238, 245, 251, 0.24);
    --copper: #e39455;
    --copper-soft: rgba(227, 148, 85, 0.16);
    --copper-glow: rgba(227, 148, 85, 0.28);
    --paper: #1a2633;
    --paper-2: rgba(22, 34, 46, 0.94);
    --sky: #8ec4ea;
    --sky-soft: rgba(142, 196, 234, 0.14);
    --wash-a: rgba(47, 126, 184, 0.32);
    --wash-b: rgba(142, 196, 234, 0.1);
    --wash-c: rgba(227, 148, 85, 0.14);
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    --shadow-lift: 0 18px 36px rgba(0, 0, 0, 0.42);
    --btn-bg: #f4f0ea;
    --btn-ink: #1c2430;
    color-scheme: dark;
  }
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-density="compact"] {
  --sidebar: 280px;
  --card-min: 220px;
  --card-pad: 0.72rem 0.8rem 0.62rem;
  --row-pad: 0.32rem 0.42rem;
  --gap: 0.6rem;
  --tile: 32px;
  --tile-card: 36px;
}

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

html,
body {
  min-height: 100%;
}

html {
  background: var(--bg);
}

html[data-scroll-lock="true"] {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(ellipse 46% 38% at 100% -10%, var(--wash-a), transparent 62%),
    radial-gradient(ellipse 34% 30% at -8% 108%, var(--wash-b), transparent 64%),
    radial-gradient(ellipse 22% 18% at 72% 100%, var(--wash-c), transparent 70%),
    var(--bg);
  text-rendering: optimizeLegibility;
}

p,
h1,
h2,
h3 {
  margin: 0;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

::selection {
  background: color-mix(in srgb, var(--copper) 28%, transparent);
}
