:root {
  color-scheme: light dark;

  --font: -apple-system, "SF Pro Text", Inter, system-ui, sans-serif;
  --font-display: -apple-system, "SF Pro Display", Inter, system-ui, sans-serif;

  --ground: #EEF0F3;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --fill: #E2E6EB;
  --fill-hover: #E9ECF0;
  --line: #D8DCE3;
  --line-strong: #C9CED8;
  --line-dashed: #B7BDC9;

  --ink: #14171C;
  --ink-2: #454C5A;
  --ink-3: #5C6578;
  --ink-4: #8A92A3;

  --accent: #C2410C;
  --accent-hover: #9A3412;
  --accent-bright: #EA580C;
  --accent-soft: #FDBA74;
  --accent-wash: #FFEDD5;
  --on-accent: #FFFFFF;

  --rail: #14171C;
  --rail-active: #2A2F38;
  --rail-ink: #C9CED8;
  --rail-avatar: #3A404B;

  --danger: #B91C1C;
  --danger-hover: #991B1B;
  --danger-wash: #FEE2E2;
  --saved: #166534;

  --dot-draft: #D97706;
  --dot-books: #2563EB;
  --dot-ok: #16A34A;
  --dot-none: #B7BDC9;

  --warn-ink: #92400E;
  --warn-wash: #FEF3C7;
  --info-ink: #1E40AF;
  --info-wash: #DBEAFE;

  --shadow-1: 0 1px 2px rgba(20, 23, 28, 0.12);
  --shadow-pop: 0 10px 32px rgba(20, 23, 28, 0.18), 0 2px 6px rgba(20, 23, 28, 0.10);
  --scrim: rgba(20, 23, 28, 0.32);
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-bright);
  --skeleton: #E2E6EB;
  --paper-shadow: #E2E6EB;

  --tone-workbook-ink: #334155;        --tone-workbook-wash: #E2E8F0;
  --tone-filled-ink: #3F6212;          --tone-filled-wash: #ECFCCB;
  --tone-homework-ink: #6D28D9;        --tone-homework-wash: #EDE9FE;
  --tone-tute-ink: #86198F;            --tone-tute-wash: #FAE8FF;
  --tone-practice-ink: #0F766E;        --tone-practice-wash: #CCFBF1;
  --tone-ppqs-ink: #92400E;            --tone-ppqs-wash: #FEF3C7;
  --tone-exam-ink: #9F1239;            --tone-exam-wash: #FFE4E6;
  --tone-notes-ink: #0E7490;           --tone-notes-wash: #CFFAFE;
  --tone-solutions-ink: #1D4ED8;       --tone-solutions-wash: #DBEAFE;
  --tone-other-ink: #454C5A;           --tone-other-wash: #E2E6EB;

  --r-sm: 5px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 12px;
  --r-2xl: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0F1115;
    --surface: #181B21;
    --surface-2: #14171C;
    --fill: #262B34;
    --fill-hover: #1F232B;
    --line: #2C313B;
    --line-strong: #3A404B;
    --line-dashed: #4A515E;

    --ink: #ECEEF2;
    --ink-2: #BCC2CD;
    --ink-3: #8F98A8;
    --ink-4: #6B7383;

    --accent: #F97316;
    --accent-hover: #FB923C;
    --accent-bright: #FB923C;
    --accent-soft: #FDBA74;
    --accent-wash: #3A2416;
    --on-accent: #14171C;

    --rail: #08090C;
    --rail-active: #22262E;
    --rail-ink: #A9B0BC;
    --rail-avatar: #2C313B;

    --danger: #F87171;
    --danger-hover: #FCA5A5;
    --danger-wash: #3B1D1F;
    --saved: #4ADE80;

    --dot-draft: #F59E0B;
    --dot-books: #60A5FA;
    --dot-ok: #4ADE80;
    --dot-none: #4A515E;

    --warn-ink: #FCD34D;
    --warn-wash: #3A2E14;
    --info-ink: #93C5FD;
    --info-wash: #1C2A44;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-pop: 0 12px 36px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
    --scrim: rgba(0, 0, 0, 0.55);
    --skeleton: #232831;
    --paper-shadow: #2C313B;

    --tone-workbook-ink: #CBD5E1;        --tone-workbook-wash: #273244;
    --tone-filled-ink: #BEF264;          --tone-filled-wash: #26331A;
    --tone-homework-ink: #C4B5FD;        --tone-homework-wash: #2E2346;
    --tone-tute-ink: #F0ABFC;            --tone-tute-wash: #3A1F3E;
    --tone-practice-ink: #5EEAD4;        --tone-practice-wash: #173532;
    --tone-ppqs-ink: #FCD34D;            --tone-ppqs-wash: #3A2E14;
    --tone-exam-ink: #FDA4AF;            --tone-exam-wash: #3D1B24;
    --tone-notes-ink: #67E8F9;           --tone-notes-wash: #15323A;
    --tone-solutions-ink: #93C5FD;       --tone-solutions-wash: #1C2A44;
    --tone-other-ink: #BCC2CD;           --tone-other-wash: #262B34;
  }
}
